(Updates to reflect passage by final vote, adds Cuomo, Flanagan comments, adds related content links)
ALBANY, N.Y., March 31 (Reuters) - New York Governor Andrew Cuomo and the state legislature agreed late on Friday on a $168 billion budget for fiscal 2019, including measures aimed at offsetting damage to taxpayers from new federal tax changes.
Cuomo outlined details of the agreement a few hours before the Senate and Assembly voted to pass the legislation needed to adopt the budget. The new fiscal year begins on Sunday.
The governor likened the federal tax changes enacted early this year to a missile launched at New York.
"We're under attack by the federal government and they're not trying to make our lives easier, frankly, they're trying to make our lives harder," he said.
To avoid a new federal cap on state and local tax deductions, New York will make those payments charitable contributions, similar to measures working their way through other high-tax states.
New York, which had faced a $4.4 billion deficit, will also create a new payroll tax to replace state income tax, Cuomo said.
New York lawmakers, with a base pay of $79,500, also will get a chance at their first raise since 1999 as the budget includes a legislative compensation review commission.
Republican State Senate Majority Leader John Flanagan said the bills avoided $1 billion in new taxes. The package also includes $18.9 billion in Medicaid spending.
"This budget invests in the shared priorities of hard-working New Yorkers - affordability, opportunity and security," Flanagan said in a statement. "It is a solid and fiscally responsible budget that protects taxpayers, creates jobs and supports many other quality-of-life issues important to middle-class families across the state."
Cuomo also agreed to boost school aid beyond earlier proposals. The budget adds $1 billion in education funding, bringing school spending to $26.7 billion altogether. It also invests $750 million in regional economic growth plans and $100 million to downtown revitalization initiatives, Cuomo said.
Cuomo, who has fashioned himself as a potential presidential candidate, is fending off a Democratic primary challenge in his quest for a third term in Albany from actress Cynthia Nixon, a public schools activist.
An extra $2 billion of revenue over four years is to come by capturing some of the sale of the nonprofit New York State Catholic Health Plan, which does business as Fidelis Care.
The budget also impacts New York City, allowing for the use of a new "design-build" procurement method to help renovate three major city projects - an expressway, the notorious Rikers Island correctional facility and the city's troubled public housing authority.
A new fee on for-hire vehicles in Manhattan would raise $415 million annually for the state's Metropolitan Transportation Authority, which runs the city's decaying subway system and has been the subject of repeated squabbles between Cuomo and New York City Mayor Bill de Blasio.
The measures lack changes sought by government reform activists who hoped a series of corruption cases involving lawmakers and people tied to Cuomo would propel reform.
(Reporting by James Odato in Albany; Editing by Daniel Bases and Bill Trott)