The District’s traditional public school system was unable to close a budget shortfall on its own before the close of the fiscal year. But city leaders have shifted funds to ensure the school system ends the fiscal year on Monday with balanced books.

D.C. Public Schools faced a $25.2 million budget deficit earlier in the year because of rising personnel costs, according to the office of the city’s chief financial officer. That budget hole now stands at $10.1 million, said Paul Kihn, the deputy mayor of education.

Under District law, government agencies cannot carry debt from fiscal year to fiscal year. That means the school system — with a budget of more than $900 million — has until Sept. 30 to plug a hole.

The $10 million deficit represents about 1 percent of the budget.

Jeffrey S. Dewitt, the city’s chief financial officer, wrote in a Sept. 13 letter to D.C. Council Chairman Phil Mendelson (D) that the mayor’s budget office will “execute a reprogramming” for the remaining funds.

That means Mayor Muriel E. Bowser (D) will shift funds to the school system from agencies that have unused money in their coffers at the end of the fiscal year.

“The District has ended each of the last 24 fiscal years with balanced budgets,” read DeWitt’s letter, which was shared with The Washington Post. “Be assured that this year will be no different.”

The school system has said that it instituted a hiring freeze at its headquarters office and has curtailed employee travel and training to cut costs.

Kihn said in a July interview that the school system employed more effective and experienced teachers than it had anticipated, which contributed to the deficit.

The school system awards bonuses based on the outcomes of teachers’ annual assessments, with teachers ranked “effective” and “highly effective” receiving more money. Experienced teachers typically earn higher salaries.

Costs for overtime — which staff members earn if they perform tasks outside the terms of their contracts, including teaching additional courses — also contributed to the deficit.

The deficit drew criticism from city leaders who said it represented irresponsible spending.

Mendelson said it showed a “lack of discipline.”

“My understanding is the deficit came about from hiring individuals at salaries that were higher than what the overall budget for the school system would permit,” Mendelson said at a Sept. 16 news conference. “That suggests a lack of discipline from the HR office at DCPS or a lack of discipline elsewhere among managers at DCPS.”