Boston city councilors say the city should do everything in its power to keep Dorchester’s Carney Hospital up and running.

The council on Wednesday adopted a resolution urging the city and its public health commission to declare a public health emergency, to “take all possible steps necessary to preserve the operations of Carney Hospital,” and to ensure that its owner, the bankrupt national chain Steward Health Care, follows all state and local laws.

“This closure would exacerbate the already overburdened health care system we have today, and it will affect every constituent in the city of Boston and beyond seeking health care services,” said Councilor John FitzGerald, whose district includes Carney Hospital. “This closure endangers the lives of everyone across our region. Steward’s brazen greed guaranteed that everyone’s next trip to the ER will be even longer.”

The resolution also urges the city and state to be prepared “to seize the property by eminent domain and to continue to operate the facility until a permanent operator is found” if no other hospital operators bid to buy Carney.

As part of its bankruptcy proceedings, Steward Health Care last month announced plans to close two Massachusetts hospitals — Carney and Ayer’s Nashoba Valley Medical Center — by Aug. 31, while seeking to sell off its other Bay State facilities to new owners. A federal bankruptcy judge has already signed off on the closures.

The timeline is faster than what’s called for under state regulations, which require a 120-day notice to close essential hospital services.

Councilor Julia Mejia noted the timing discrepancy as she called for officials to “think outside the box and figure out what we need to do to keep Carney open.”

“My mom gets care at the Carney, so this is personal,” Mejia said. “I live down the street from Carney. It is a staple in our community.”

Twelve city councilors voted in favor of the resolution. The thirteenth, Councilor Tania Fernandes Anderson, voted present and said she would have liked more conversation on the topic.

The council’s move follows a similar vote Tuesday night in Ayer, where the Select Board approved a resolution that calls on Gov. Maura Healey to declare a public health emergency, do everything in her power to ensure Steward adheres to the 120-day closure period, and work with officials at all levels of government on a transition plan to keep Nashoba Valley Medical Center open.

Speaking to reporters Tuesday, Healey said she felt for patients who fear losing their health care and providers who fear losing their jobs.

“This is a situation that Steward created through greed and mismanagement,” the governor said. “Right now, we are focused on saving five community hospitals.”

Next week, the state Department of Public Health plans in-person and virtual hearings in Dorchester and Ayer to hear public feedback on both closures.

Spectators on hand ahead of the Boston vote Wednesday wore hospital scrubs and blue T-shirts that said “Carney Strong.” Council President Ruthzee Louijeune said members of the Massachusetts Nurses Association were in the chamber as part of “their work to really save the Carney.” The two hospitals’ closures would also mean nearly 1,250 employees will lose their jobs.

Councilor Ed Flynn compared the fight to keep Carney open to the way nurses and other hospital workers refuse to give up on their patients.

“The workforce wants us to do everything we possibly can to keep this critical medical facility open, and at the end of the day, we have to ask ourselves as city officials, have we done everything in our power to keep it open?” Flynn said. “Did we give 100% of our time and effort to keep it open? We’re not there yet. It’s too early to talk about a closure.”