D.C. Mayor Muriel E. Bowser (D) on Wednesday celebrated the completion of the first of seven new shelters for homeless families, marking a major step in her ambitious and sometimes contentious plan to replace the rundown megashelter at the former D.C. General Hospital with a network of smaller lodgings scattered across the city.

The mayor cut the ribbon on a sleek 45-unit shelter off the Kennedy Street NW corridor in Ward 4, where the first families are set to move in as early as next week.

New shelters in Wards 7 and 8 are expected to open later this fall after construction delays. Shelters in Wards 3, 5 and 6 are planned to open next summer, while a building in Ward 1 is projected to be completed by 2020.

“In a city as prosperous as ours, we can do better by our families who need a second housing opportunity,” Bowser told reporters.

The pomp and circumstance of Wednesday and the building’s moniker — the Kennedy — resembled the unveiling of a new condominium project more than a homeless shelter.

Instead of metal detectors and uniformed security officers, residents will be greeted by a receptionist at a front desk. Each floor has a different bright color scheme. Rooms are equipped with armoires, refrigerators and, in nine units, private bathrooms with bathtubs — amenities not available at D.C. General.

“This is a home,” said Greer Gillis, the director of the Department of General Services, which was in charge of building the new shelters. “We wanted to go for more of an apartment-like aesthetic.”

The budget for the Ward 4 shelter was $14 million. Gillis said the final costs were being calculated.

The disappearance of 8-year-old Relisha Rudd from D.C. General in 2014 brought public attention to the poor housing conditions at a vacant hospital, where children played in waiting rooms and problems with heating and vermin were rampant.

Shortly after taking office in 2015, Bowser set out to raze the hospital and build smaller facilities she said would be more dignified and secure.

But her plan has been mired in controversy, including neighborhood opposition, allegations of cronyism and an ongoing probe from the inspector general’s office prompted in part by delays and the selection of a subcontractor with little experience.

Still, on Wednesday, Bowser seemed ebullient at the realization of a campaign promise. She brought her newborn daughter, Miranda, in a stroller to mark the occasion, the child’s first appearance at an official mayoral event.

“I couldn’t be prouder of Ward 4 for stepping up,” said Bowser, who represented the ward on the D.C. Council before she was elected mayor in 2014. “It takes people saying, ‘You may not have as much money as me, but your hopes and dreams for your children are like me.’ ”

Bowser’s comment seemed to be a dig at residents who continue to fight the construction of new shelters.

In Ward 3, the wealthiest part of the city, opponents of the homeless facility have filed a lawsuit and a zoning challenge over plans to expand an outdoor patio space.

The shelter in Ward 4, in contrast, had fewer hiccups because it involved renovating a medical office rather than building from scratch, and it had the support of local leaders. Some called the attractive new building a welcome addition to an area dotted with boarded-up carry-outs and rowhouses in disrepair.

The National Center for Children and Families, a nonprofit, won the contract to run the Ward 4 shelter.

Meanwhile, 59 families still live at D.C. General, which is set to permanently close by the end of October. Those who don’t find apartments using city vouchers will be placed in motels, new shelters or other city-paid housing.

The road to closing D.C. General hasn’t been easy for Bowser.

In 2016, the council overhauled her original plan to lease private property for the shelters, an arrangement that would have benefited some of the mayor’s major campaign donors.

Council Chairman Phil Mendelson (D) accused the mayor of “obfuscation and misinformation” with her homeless shelter plan, and Bowser in turn fired back with a vulgarity.

The Washington City Paper reported in June that the city was behind schedule in the construction of facilities in Wards 7 and 8, prompting a council oversight hearing and a probe launched by the city’s inspector general.

Demolition work began during the summer at a vacant building on the D.C. General campus, and lead was discovered, alarming activists for the homeless who worried that children still living in the megashelter were being exposed to the neurotoxin.

A majority of the D.C. Council asked Bowser to stop demolition, and activists protested outside the mayor’s house and office, but city officials insisted there was no danger to public health. Some speculated the city was pushing to clear out the land to sell to developers or to Amazon.com for its second headquarters. (Amazon founder Jeffrey P. Bezos owns The Washington Post).

At Wednesday’s news conference, Bowser declined to explain why demolition at the hospital campus couldn’t be postponed until after families have vacated the shelter or what her administration planned to do with the land.

“It’s time, it’s past time to demolish D.C. General,” she said.

Gillis told the council this week that the lead problem appeared to be remediated. Demolition work, which had been paused for several weeks during the testing, will resume next week, she said.

City officials say they want the average stay in the new homeless family shelters to be 90 days and hope that better living conditions will make it easier for families to get back on their feet and become self-reliant.

“The assumption that people need an uncomfortable space in order to be motivated to leave is based on ignorance,” said Laura Zeilinger, who oversees services for homeless people as head of the Department of Human Services. “Everybody wants their own place for themselves and their children. It’s about being supported in order to achieve the goal.”