Despite gloomy economic forecasts, Colorado lawmakers managed to keep the state’s school funding shortfall from growing this year.

The state’s public schools will see on average an additional $242 per student next year after state lawmakers approved this year’s school finance bill Wednesday, the last day of the legislative session.

The state’s per pupil funding amount will be $6,546. The state will spend more than $6.5 billion in total on per pupil funding. Schools districts receive other funds for additional factors, such as their size and geographic location, and the number of at-risk students they serve.

An earlier change to how the state calculates property taxes made the increase possible.

“I think it was a great accomplishment for our schools that we were able to pass a budget that didn’t make the cuts that we had originally anticipated,” said state Rep. Millie Hamner, a Dillon Democrat and vice-chair of the Joint Budget Committee. “I remain fully committed to continuing the conversation around how Colorado can continue adequately and equitably funding our public schools.”

Lawmakers in both chambers agreed that this year’s budget process was one of the most complex and difficult in recent memory.

Even before the session started, Capitol observers and school districts worried about deep cuts. But as lawmakers got to work, the funding outlook became even more dire.

Officials began forecasting that the amount of money that goes to schools from local property taxes would decrease sharply. The state would have to find hundreds of millions of dollars — that it didn’t have — to make up the difference.

When the budget was first introduced, the state’s $828 million education funding shortfall would have increased by about $48 million.

But the State Board of Equalization made a technical adjustment to its formula that values commercial property tax. That gave lawmakers extra revenue to send to schools and the state’s education savings account.

The additional money didn’t stop this year’s school finance bill from becoming a political fight. Lawmakers in both chambers attempted to attach controversial amendments to the bill. But a bloc of Democratic senators forced their peers to remove provisions on charter schools that they didn’t like.