Mayor Muriel E. Bowser on Tuesday celebrated a one-year expansion of the city's summer youth jobs program. The D.C. Council on Wednesday approved a $13 billion budget plan that eliminates funding for the initiative next summer. (Aaron Davis /THE WASHINGTON POST)

The D.C. Council passed a $13 billion spending plan Wednesday that pours record tax revenue into school improvements and new police body cameras and directs the largest infusion of money ever to combat the city’s crisis of homelessness.

After weeks of disagreement between Mayor Muriel E. Bowser (D) and the council chairman, Phil Mendelson (D), both walked away claiming victory in a budget battle that Bowser said would lay out a blueprint for her term.

The mayor secured $7 million for free Metro transit passes for all traditional public and charter school students a day after she refused to bend on one of the city’s smallest budget items.

Mendelson held firm in refusing to fund a citywide rollout of body cameras without more transparency and clearer guidelines on their use, or to expand a youth jobs programs up to age 24. But he promised to revisit the idea if a one-year trial run this summer is wildly successful.

“I don’t believe providing six-week jobs to 24-year-olds at minimum wage is the way to get them good, meaningful jobs. I just don’t believe it,” Mendelson said. “But prove us wrong, and it will force us to reconsider.”

Even as Bowser and Mendelson negotiated, a federal court ruling threw the budget vote into question. The ruling, by the U.S. Court of Appeals for the District of Columbia, reopened the issue of a voter-approved ballot proposal that would allow the city to bypass congressional approval of its budget.

Currently, the city’s entire spending plan, including more than $7 billion in locally generated tax revenue, must be submitted to Congress for approval. There, D.C. laws on gun rights, abortion coverage and other social policies routinely come under attack from conservative lawmakers.

The ruling sends the Budget Autonomy Act back to D.C. Superior Court for consideration. City leaders disagreed on its effect, however.

Bowser issued a statement calling the court ruling the “biggest victory for District autonomy since the end of the federal control board era.” Mendelson said he believed that the ruling would force the council to hold a second vote on the budget next month. That would for the first time codify the city’s budget as a local law, instead of a budget proposal, akin to that of a federal agency that must then be sent to Congress for approval.

But the city’s chief financial officer, Jeffrey S. DeWitt, and attorney general, Karl A. Racine, issued a joint statement late Wednesday that the ruling did not address the legality of the Budget Autonomy Act.

Previously, DeWitt has maintained that the 2010 referendum improperly altered the city’s congressionally approved charter and could expose him to federal prosecution for appropriating money not approved by Congress.

In their statement, DeWitt and Racine promised to seek “judicial clarity” before they participate in enacting and implementing an independent city budget.

“Proceeding with the budget process without such clarity would endanger the District’s finances and cause unnecessary uncertainty as to the manner in which the District manages its financial affairs,” they said.

Meanwhile, the D.C. Council passed the spending plan unanimously Wednesday, and Mendelson said he would work to keep council members from tinkering with it if a second vote on a final budget document is scheduled.

The mayor and council reached agreement only after a flurry of last-minute text messages and phone calls between aides and lawmakers.

In a series of final budget maneuvers Wednesday, Mendelson added almost $10 million to Bowser’s already record request for spending on homeless services. The city will spend at least $146 million, or 30 percent more, on services to house and feed the homeless — and try to connect homeless individuals and families with jobs, apartments and counseling.

On top of that, the District will direct almost $178 million to affordable-housing programs, an increase of 35 percent.

Another $40 million in borrowing will begin to build a new network of smaller homeless shelters.

Council members said some of those expenditures will come at the cost of another top Bowser priority to move more quickly in pushing school improvements.

Council member David Grosso (I-At Large), who heads the Education Committee, said the problem with the education budget “is that the mayor cut so much money out of it.”

Bowser vowed during last year’s mayoral race to transform the District’s middle schools, saying she would bring the kind of extracurricular options and academic programs featured at the District’s high-achieving Alice Deal Middle School to middle schools throughout the District.

But last week, Grosso said Bowser’s budget had not made a new commitment to middle schools at all. “I would say that it was the same, steady investment, but not an overwhelming amount of money,” he said. “And I would say that she only invested in one middle school construction project.”

Pressed about that shift in an interview on Tuesday, Bowser said: “I never said that what it would take, would be to increase the budget for middle schools.”

The council also handed the District’s beleaguered Metro transit agency $42 million more than last year to fund its operating expenses, and the District committed to helping Metro buy 220 new 7000-series rail cars.

Metro has until mid-July to buy the new railcars before the manufacturer’s price offering expires.

In the public safety budget, however, the council halved Bowser’s request to buy 2,400 police body cameras next year, enough for every patrol officer.

Council member Kenyan R. McDuffie (D-Ward 5) said the slower rollout would force the administration to come up with a plan for how to allow greater access to the video captured by officers’ cameras. Bowser had proposed exempting all of the footage from public records laws.

“This is going to be an opportunity for the District to roll out one of the most robust body camera systems in the country, and it’s going to be an opportunity for us to do it in a way that is measured, thoughtful,” McDuffie said.

Bowser, however, won some concessions on other priorities Wednesday involving Metro rides for school students and the Marion S. Barry Summer Youth Employment Program.

Bowser had proposed expanding the program permanently for residents up to age 24, from a current cap of 22. Mendelson refused.

Council member Vincent B. Orange (D-At Large), who helped broker a compromise Wednesday morning in calls and texts, said that if the city can find permanent jobs for 350 of the 1,000 people in the program, he is sure Mendelson will reluctantly fund the program next year.

Council member Jack Evans (D-Ward 2) said the city was spending so much on many fronts that lawmakers and the public needed to demand results.

“We are funding in our homeless area more money than we have ever done in our history,” Evans said. “Next year, when we come back here again, we have to have results. . . . The followup is much more important than the passing of this budget.”