BALTIMORE — Baltimore City schools have lost out on millions of dollars for repairs to heating systems and other infrastructure needs when the money went unspent and had to be returned to the state.

The Baltimore Sun reports that city schools have lost out on $66 million in state funds since 2009. The money was rescinded under state rules designed to make sure money is not wasted.

The news comes as the city teachers’ union demanded closures in numerous schools where heating systems were failing during a week of frigid temperatures. Complaints about a lack of heat have been lodged in nearly 40 percent of school system buildings.

Officials say the spending issues occur when projects get delayed and then exceed initial cost estimates.

Alison Perkins-Cohen, the school system’s chief of staff, acknowledged that the city’s school buildings — some of the oldest in the state — are not in great shape.

“They really can’t handle two weeks of sustained cold,” she said. “We’re in boiler whack-a-mole. You think you fixed one and another pops up. You fix one and then a coil breaks. Our windows are terrible. Our operations staff is working around the clock.”

As for the rescinded funds, she said poor school systems are at a disadvantage. She said wealthier systems pay for the repairs upfront, and then seek money from the state as reimbursement.

Baltimore, meanwhile, needs the state money to pay for the repairs, so delays in the process lead to cost overruns that place the projects in jeopardy and the state money at risk of rescission.