The City of Boston had revenues $55 million over budget and exceeded its spending appropriations by $34 million in the fiscal year 2018, according to a new report from the Boston Municipal Research Bureau.

The report concluded that the city ended the fiscal year with a $21.2 million general fund operating surplus. It stated that he surplus is “due to the fact that actual receipts exceeded budgeted revenues by $55.7 million.”

In a statement to the Herald, Mayor Martin J. Walsh praised the city’s financial responsibility.

“Thanks to the City’s strong fiscal management and robust economic growth, driven in part by the City’s economic development policies, we have been able to invest in key priorities and achieve cost savings opportunities through thoughtful reforms,” Walsh said.

The city was also able to make a $12 million payment to its pension fund.

“This has resulted in budget surpluses for the past five years and this year we were able make a supplemental payment to the pension fund, keeping us on track to fully fund our liability by 2025, 15 years ahead of the state requirement and many other municipalities,” Walsh added in the statement.

The extra cash was offset by some overages in city departments, which came mainly from the police and fire departments, which garnered a $15.3 million deficit due to overspending overtime budgets and purchasing equipment, according to the report, which also said 67 percent of the deficit was due to overtime, specifically adding that it was “primarily as a result of increased hours in general and for events like the Freedom Rally.” The report also said that the growth in officer wages contributed to overtime expenses.

Walsh has previously announced that the city has maintained a perfect AAA bond rating. The report revealed that for a seventh consecutive year, the city’s revenue surplus allowed it to “forego using revenues initially budgeted for operations” for other needs.