After a contentious battle, Minneapolis Public Schools on Tuesday approved its “second best” budget for the upcoming school year — making deep and painful cuts to schools and the central office to erase enormous deficits.

And for the first time in seven years, school officials ceased their perpetual cycle of dipping into the district’s reserves to cover chronic shortfalls.

The school board voted 8-1 to adopt the final budget at its regular meeting Tuesday night.

Minneapolis district officials announced last year that it faced a projected $33 million deficit for the 2018-19 school year, the biggest in recent history, largely because of declining enrollment and revenue that hasn’t kept up with inflation and growing operating costs.

Its rainy-day fund also was expected to drop to $25 million at the end of this school year, a dangerous threshold that threatened the financial stability of the state’s third-largest school district.

Ibrahima Diop, the district’s chief financial officer, recently touted the twice-revised budget, calling it a “big win” for a district that has not delivered balanced financial documents for nearly a decade.

Diop said he has yet to see a district that had a $33 million deficit “closed in one year.”

The choice, he said, was to either tackle the deficit now or wait until next school year and deal with a projected shortfall of at least $48 million.

“This budget has been a difficult one because it was a way of saying, ‘From now on, the district doesn’t want to be in a deficit year in and year out.’ ”

An overwhelming number of board members who voted to approve next year’s budget agreed.

“We can’t say that we vetted this budget using our complete equity impact tools because of the short time frame and because of the decisions the board made,” board treasurer Jenny Arneson said. “It’s really important that we move on.”

Only board member KerryJo Felder voted against the budget.

“I’m yet to see where Minneapolis Public Schools is showing equity toward north Minneapolis schools in terms of curriculum, in terms of facilities for sports and in terms of other programming,” Felder said. “We have a lot of work to do.”

To wipe out the $33 million deficit, officials slashed $18.4 million from the central office ­— the district’s headquarters that supports services at the system’s 70-plus schools and programs — and cut nearly $15 million from school buildings.

It wasn’t an easy process. After a second round of much-debated budget fixes that restored $6.4 million in cuts to secondary schools, Superintendent Ed Graff said in his April budget message that as a result of the changes “service delivery to schools, staff, families and community may not be as efficient and effective.”

To sap the deficit, board members also voted to change school start times next year for 20 schools, a decision they say will save the district about $2 million.

In April, the school board also approved a two-year tentative contract agreement with its teachers, offering a 0.5 percent pay hike, retroactive to July 1, 2017. The pay increase, which is reflected in the approved 2018-19 budget, is estimated to cost the district $2.4 million.

In other board news, district officials approved two referendum questions that will appear on the ballot this fall — an extra $18 million referendum and $12 million technology levy.