D.C. Council Chairman Phil Mendelson (D) engaged in a protracted standoff with the city’s chief financial officer over tens of millions in funding. (Jahi Chikwendiu/The Washington Post)

Nearly $24 million will be poured into repairing dangerously dilapidated public housing complexes in the nation’s capital after D.C. lawmakers voted Tuesday to redirect money that was originally in the reserves of the Washington Convention and Sports Authority.

The funding, which advocates said would probably pay for renovation of at least 400 units, was part of roughly $47 million the D.C. Council claimed in money originally in the convention authority’s accounts. It was a victory for lawmakers after a weeks-long showdown with the District’s chief financial officer, who had threatened not to certify the city’s budget, saying that the reserve money could not be redirected.

The details of that dispute consumed much of the council’s time and attention in the weeks before Tuesday’s passage of the $15.5 billion fiscal 2020 budget, as D.C. Council Chairman Phil Mendelson (D) and CFO Jeffrey S. DeWitt fought over what would become of the money.

Mendelson’s tactics ultimately paid off, with DeWitt signaling this week that he would not stand in the way of the budget’s approval. His spokesman confirmed after the council’s vote that DeWitt would certify the spending plan — a requirement before it can be submitted to D.C. Mayor Muriel E. Bowser (D) and Congress.

“I think the council did the right thing — this is their money to spend, and they spent it on a critical priority for the community,” said Amber Harding, a staff attorney at the Washington Legal Clinic for the Homeless.

Harding said there are 2,500 public housing units in need of urgent repairs to deal with health hazards such as mold and lead. “We’ll need more” money, she said, “but it’s a really good first step.”

The rest of the $47 million appropriated by the council will be used to fund upgrades to the District’s 911 dispatch center, eliminating the need for a hotel room tax increase that was included in the mayor’s proposed budget.

A spokeswoman for Bowser did not respond to a request for comment.

DeWitt initially said that any alternative use of reserve funds from the convention authority could imperil the city’s credit rating and would violate obligations to bondholders whose investments funded the construction of Walter E. Washington Convention Center in 1998 and its hotel in 2010.

However, Mendelson and D.C. Attorney General Karl A. Racine (D) found documents showing that the authority’s reserves were being kept at a level too high and that the authority should have transferred nearly $47 million to the city’s general fund since fiscal 2017.

DeWitt then said he was placing that money in reserves that offer a cushion of operating cash for emergencies, as well as accounts that fund the construction of affordable housing and other capital costs.

A spokesman for DeWitt said Monday that he no longer objected to the council’s use of those funds, since they were not being drawn directly from the convention authority reserves.