A late-night, no-contest legislative agreement has brought changes to the state’s teacher evaluation system a crucial step closer to becoming law.

The deal also heads off protest by the evaluation system’s critics, including principals from across the state who had planned to ask legislators to make changes.

Under the agreement, the State Senate and Assembly agreed to approve revisions to the state’s 2010 teacher evaluation law proposed last month by Gov. Andrew Cuomo’s office and the state’s main teachers union, NYSUT. The agreement came during a spree of deals that lawmakers tore through all night and well into this morning, on issues as wide-ranging as the state’s pension system, congressional redistricting, and a database to store most convicted criminals’ DNA.

In large part because NYSUT had signed on to the framework, the evaluations legislation was among the least controversial issues before the lawmakers. They made no changes to the framework agreed upon last month.

That the legislature included teacher evaluations in the spree at all was something of a surprise. Cuomo had proposed the revisions to the law as part of the budget amendment process, meaning that they would be approved only when the state’s budget is finalized by the end of the month. Now, as soon as Cuomo signs the legislation, it goes into effect, and changes to teacher evaluations won’t be on the table when legislators haggle over budget items.

The legislative approach spells the likely end of the line for an insurgency by more than 1,400 principals from across the state who planned to press lawmakers during the budget process to make some changes to the evaluation framework. A group of about 70 principals convened earlier this week on Long Island to prepare an ad for next week’s edition of Legislative Gazette, a small publication widely read by insiders in Albany. Now, when the ad appears, the budget process is likely to be ongoing, but teacher evaluations won’t be part of the debate.

Cuomo cheered the agreement in a statement late last night.

“We are writing into law a new national model for teacher evaluations that will put our students first and put New York State at the front of the class when it comes to school accountability,” he said. “I commend the legislative leaders for taking this extraordinary step to create permanent and real evaluations in our schools.”

A press release from State Education Commissioner John King and Board of Regents Chancellor Merryl Tisch heralding the deal arrived just after midnight.

Tisch praised the deal but cautioned that it was “just a part” of what state officials must do to boost education across the state.

“Our work is by no means over. The Regents have adopted a major education reform plan, and teacher and principal evaluations are just a part of that reform,” she said in the statement. “Our work will not be finished until we’ve made sure all our students receive the education they need to succeed in college and careers.”

The agreement also includes the New York City-specific appeals process that the city and UFT said last month that they had agreed on. That piece of the law will take effect Jan. 17, 2013 — but only if the city and union and settle on the local details of a teacher evaluation system before then. City and union officials are locked in a stalemate over Mayor Bloomberg’s plans to overhaul 33 struggling schools and do not appear anywhere close to a deal on new evaluations.

The January 2013 date is the deadline Cuomo set earlier this year for districts to settle on details of their evaluation system or risk forgoing increases to their state school aid.