District lawmakers on Tuesday approved Mayor Muriel E. Bow­ser’s plan to close the city’s most notorious homeless shelter, setting the guidelines for the construction of smaller replacements across the city.

The plan will allow the District to shutter the vast complex at D.C. General, which houses hundreds of homeless families, and create six smaller replacement shelters that Bowser said will provide a safer and more rehabilitative environment than the old hospital in Southeast Washington, which has attracted broad public criticism since an 8-year-old girl there disappeared last year.

The D.C. Council’s vote marked a victory for Bowser, who has vowed to end chronic homelessness in the District in five years. But the proposal faced fierce opposition from some council members and homeless advocates because the new, smaller shelters would not provide homeless families with private bathrooms, which some said are critical to keeping children and the disabled safe.

Opponents have pointed to the unsanitary conditions in the shared restrooms at D.C. General, where parents sometimes have to send young boys into men’s bathrooms by themselves.

“Spend a little bit more for dignity and safety,” council member Mary M. Cheh (D-Ward 3) said during a debate over her amendment to the bill that would have required private bathrooms for each room. “What is wrong with us?”

Supporters of the mayor’s original proposal said that it would make the eligibility process easier for families and officials to navigate and that the shared-bathroom plan would save on construction costs and prevent families from becoming too established in the temporary shelters.

All 13 D.C. Council members said Tuesday that they supported the plan to close D.C. General. But Bowser’s allies on the council said that bathrooms for all would increase costs and potentially delay the closure of the decrepit D.C. General shelter.

“I’d rather go to a Porta Potty outside than go to some of those living conditions in D.C. General,” said council member Yvette M. Alexander (D-Ward 7).

The District’s homeless crisis is growing as the cost of living rises and the city’s poorer residents struggle to keep up. More than 700 families reside in shelters and overflow motel rooms, and D.C. officials expect that number to more than double this winter.

The shelter debate, which was at times bitter and sarcastic during a routine council breakfast Tuesday, highlighted the deepening tensions among lawmakers, as those up for reelection next year seek to tie themselves closely to Bowser before hitting the campaign trail.

No one up for reelection, including the two council members who represent the city’s poorest wards, voted in favor of Cheh’s amendment, which lost 9 to 4.

Tensions also emerged when freshman lawmaker Elissa Silverman (I-At Large) challenged a $60 million tax-incentive package to keep a major corporation, the Advisory Board, in the city.

Silverman introduced four amendments to put tighter restrictions on the deal, including one that would force the company and its subcontractors to pay employees a living wage. That was met by fierce opposition from council member Jack Evans (D-Ward 2), who is also up for reelection next year and who defended the expense to keep the company in the city.

“I wish we would spend this amount of effort on the hundreds, if not billions, of dollars that we put into programs that we have no idea how it gets spent,” Evans said.

“How much is wasted in our Medicaid programs? . . . This, it’s a great bill, keeping a great company here.”

Aaron Davis contributed to this report.