ALBANY — Gov. Andrew M. Cuomo and legislative leaders agreed to an ethics package that would forfeit the pensions of elected officials convicted of corruption and disclose the identities of some big-money donors who form committees to fund campaigns.

The measure agreed to Friday, a day after the 2016 legislative session was scheduled to end, seeks to reduce the influence of big donors on campaigns.

A U.S. Supreme Court decision known as Citizens United has helped wealthy donors dramatically increase spending by campaigns, but the state agreement would require tougher restrictions on these “independent expenditures groups” and political action committees while prohibiting any coordination by them with the candidates they favor.

StoryState bill would end convicted pols’ pensionsStoryTalks stall on pension forfeiture legislationEditorialEditorial: Crunch time for reforms from Albany

“Until the Supreme Court reverses its decision or Congress acts to change the law, states should follow New York’s lead and use their powers to rein in the devastating impact of Citizens United,” Cuomo said.

Under the deal, the legislature will adopt a measure to change the constitution to deny pensions to elected officials and top policymakers convicted of corruption. The legislature will have to adopt the measure a second time next year to send the issue to a public referendum, where New Yorkers will make the final call. It would be effective by 2019.

Senate Majority Leader John Flanagan (R-East Northport) called the deal “a critical step forward in restoring the public trust and giving hardworking New Yorkers a government they can be proud of.”

advertisement | advertise on newsday

The deal comes six months after the corruption convictions of former Senate Majority Leader Dean Skelos (R-Rockville Centre) and former Assembly Speaker Sheldon Silver (D-Manhattan). More than 30 officials have lost their jobs to corruption probes in the last decade.

The deal is “further limiting the influence of outside money in our elections and taking pensions away from corrupt public officials,” said Assembly Speaker Carl Heastie (D-Bronx).

But Susan Lerner of Common Cause said: “Nothing in this bill touches either the legislators’ or executive’s behavior. It touches on someone else.”

@Newsday

The leaders also agreed to two school measures.

The deadline to have an evaluation plan in place approved by the state was moved to Dec. 31, instead of Sept. 1, before districts lost out on extra state aid for lack of compliance.

The deal also requires regular testing of water in schools for lead, closing a loophole that let schools avoid the testing and possibly costly remediation if they were served by municipal water supplies.

Failing to gain legislative approval was a move to allow ride-sharing companies such as Uber or Lyft to ply their new kind of transportation service upstate and on Long Island. The popular service nationwide is already allowed in New York City under a local law.

A previous deal to allow alcohol to be sold before noon on Sunday also gained final legislative approval by the Assembly on Friday and is expected to be signed into law by Cuomo. Restaurants and taverns outside New York City would be able to seek up to 12 single-day permits annually to open at 8 a.m. on Sundays.

advertisement | advertise on newsday

The legislature also agreed to make the use of computerized ticket “bots” to buy big blocks of tickets to Broadway shows, sports events and more to jack up prices for resale a misdemeanor. Although Senate Republicans had sought a felony-level crime, “at the end of the day, we are going to have — for the first time — a bill that imposes criminal sanctions,” said Sen. Andrew Lanza (R-Staten Island).

The rush of agreements flowed Friday after the Senate, Assembly and Cuomo spent most of the last two days trying to decide how long to extend mayoral control of New York City schools. Democrats in the Assembly had sought three to five years at one point, but amid feuding between Mayor Bill de Blasio against the Senate’s Republican majority and Cuomo, the agreement fell to one year, with a chance to extend it next year.