In the final hour of the 2018 legislative session, Colorado lawmakers adopted a compromise plan they hope will bring solvency to the state’s public employees retirement system.

The deal that emerged from 12 hours of negotiations Wednesday was not the deal that many people expected to see when the day started. It raises the retirement age for new teachers from 58 to 64, requires public employees to put an additional 2 percent of their pay into the retirement system, and reduces cost-of-living raises for retirees. The Colorado Education Association said it shows a serious disregard for the thousands of teachers who rallied at the Capitol just weeks ago.

But the teacher rallies were far from the only political backdrop to the negotiations. This is an election year, and a Republican might be sitting in the governor’s office come January, namely Colorado Treasurer Walker Stapleton. His plan for the Public Employees Retirement Association system includes a freeze on cost-of-living increases for retirees until the fund becomes more financially stable, something that could take decades, and no additional taxpayer contributions.

That gave Democrats an incentive to get a deal done this year. And beyond politics, the problems with PERA only increase every year that more money doesn’t go into the system.

PERA is estimated to have an unfunded liability of between $32 billion and $50 billion, endangering retirement benefits down the road, along with the state’s credit rating.

The bill that passed commits $225 million a year in taxpayer money to shoring up the pension system, something long opposed by Republicans, as well as by Democratic Gov. John Hickenlooper. In an unusual late night appearance to lobby for the bill with skeptical Democrats, Hickenlooper stressed the significance of that compromise.

But last minute changes to the bill mean that the taxpayer contribution won’t increase over time. Instead, public employers – like school districts – will put in an additional 0.25 percent.

Colorado teachers can’t participate in Social Security, which means they rely on PERA benefits in retirement. Those are based on a percentage of what they made in their highest earning years, along with other factors. In 2016, the average pension for a school district retiree was $37,000. The bill freezes pensions for two years, then offers 1.5 percent cost-of-living raises, not the current 2 percent.

“We are very disappointed in our elected officials who did not support educators and retirees, and even chose to take money out of their pockets,” CEA President Kerrie Dallman said in a statement emailed after the vote. She called the bill “an unfortunate lesson in politics, reminding us that those in power who represent the people can still be completely tone deaf to their constituents. … This is bad policy done in haste.”

The version of the pension overhaul that passed the Republican-controlled Senate in March called for employee contributions to gradually go up 3 percentage points, to 11 percent, and for cost-of-living raises to go down to 1.25 percent. The version that came out of the Democratic-controlled House spared employees any increase in contributions. The $225 million taxpayer contribution was secured as a set aside in the budget process.

The final version was always going to be somewhere in the middle, but the reaction from Democrats indicates this deal was not the one they had in mind. Several lawmakers asked to be removed as co-sponsors from the legislation.

Brian Eason of the Associated Press reported that the teachers union was willing to accept a retirement age of 63, but no higher. The union lost that battle. The final bill still does not allow teachers to opt into a 401(k)-like defined contribution plan, something the union adamantly opposed.

House Majority Leader K.C. Becker, a Boulder Democrat and co-sponsor of the bill, pleaded with her colleagues to think of the long-term problems that need to be solved.

“We have to reform the system in a way that spreads the burden and has shared sacrifice,” she said. “Some people are not happy that there’s an additional taxpayer contribution. Some people are not happy that there’s an additional employee contribution. But the system is not going to fix itself.”

She said a no vote was a vote to “leave a $32 billion problem unaddressed.”

On the floor of the House, with the clock ticking down, no Democrats argued against the bill, but 25 of them voted against it, including Speaker of the House Crisanta Duran and every Democratic member of the House Education Committee.

On Thursday morning, Duran said she thought the retirement age and the employee contributions in the bill were too high.

“These are tough conversations,” she said. “PERA could have been solvent without the proposal that was passed last night. There were some things they didn’t have to push as hard.”

Some conservative Republicans also voted no in the House – they don’t think this bill does enough to fix the public pension system. But over in the Senate, where state Sen. Jack Tate of Centennial led negotiations, the GOP presented a unanimous bloc of yes votes. All 11 no votes came from Democrats.

Senate Majority Leader Chris Holbert, a Parker Republican, said that the PERA bill represented a compromise for both sides, and he had no criticism of it after all the effort that went into making a deal.

“I see folks on the right saying it doesn’t go far enough, and I heard that people from the teachers union were quite upset,” he said. “In a split legislature, I don’t know how much better it could have got done, but it got done.”

This story has been updated with comments from House and Senate leadership.