ALBANY - New York lawmakers reached a deal on a $163 billion state budget Friday, Gov. Andrew M. Cuomo announced, after a week of wrangling made it seven days late and triggered emergency spending measures to avoid a government shutdown.

The plan, which still must be approved by the Senate and Assembly, would hike aid to school districts by $1.1 billion, or an average of 4.4 percent, create a pathway to free tuition at state colleges for some families, extend the so-called “millionaires’ tax” and give the governor broad authority to change the budget without legislative approval in the face of federal budget cuts.

The budget would also authorize $2.5 billion in future spending on water infrastructure, some of which could help homeowners with aging septic systems on Long Island.

“This was a very robust and very challenging agenda because these are challenging times,” Cuomo said. “The Legislature stepped up to the plate and made it happen.”

Although no legislative leaders appeared with Cuomo, he said Senate Majority Leader John Flanagan (R-East Northsport), Independent Democratic Conference leader Jeff Klein (D-Bronx) and Assembly Speaker Carl Heastie (D-Bronx) have agreed to the budget. Cuomo said the measure will be passed in the next several days.

Besides appropriating money, the budget would also make significant policy changes. It would raise the age of criminal responsibility from 16 to 18 — New York was one of two remaining states at 16 — and move all cases involving 16- and 17-year-olds to Family Court, except for the most violent offenses.

advertisement | advertise on newsday

The budget also would add $10 million for legal services for immigrants to fight deportation orders — a priority for Democrats and Cuomo.

Under the budget, future state aid increases to charter schools would be tied to aid increases for regular schools, beginning in two years.

Cuomo also said he won a “federal funding response plan” that will give him extraordinary power to cut the budget unilaterally in the face of expected federal aid cuts. In a compromise with the Legislature, the Senate and Assembly will have 90 days to agree on cuts first.

Flanagan, in a statement, said the budget “rejects new fees and protects one of the biggest and boldest tax cuts in state history, makes the largest-ever investment in clean water, helps families better afford the high costs of college and ensures all of our schools have the resources they need to give students a high-quality education.”

“The Assembly Majority is pleased to deliver a budget that keeps the promise to our students by securing significant aid for public schools as well as broadening access to higher education opportunity programs for middle- and low-income families,” Heastie said.

The budget had been due a week ago. Lawmakers had enacted emergency spending measures Monday to avoid a government shutdown.

Cuomo said the budget continues to keep state spending under 2 percent growth and includes middle class tax cuts that will benefit 6 million New Yorkers, although no details were provided Friday.

He said the budget also includes his “college affordability” measure that will provide additional aid to 80 percent of New York households making less than $125,000 a year to cover public college tuition. The measure provides more Tuition Assistance Plan grants to students at private colleges, in a measure pushed by Senate Republicans.

The governor said the budget includes the Senate Republicans’s measure to save employers about $700 million, and a tax break for developers of New York City residential units that will also provide 100,000 affordable housing units.

The budget would also authorize ride-sharing services such as Uber and Lyft on Long Island and upstate.