Philadelphia Health Commissioner Thomas Farley joins at least 250 top public health officials across the country who have been fired or quit since the start of the pandemic.

But although his colleagues’ departures involved politically charged clashes over pandemic management, Farley’s crisis leadership was mostly applauded — except for the vaccination partnership with Philly Fighting COVID that turned into a scandal and forced Farley’s deputy to resign.

Rather, Farley is leaving because of what he called “a terrible error in judgment” long before the pandemic: He arranged for the cremation and disposal of victims’ remains decades after the infamous 1985 MOVE bombing, without notifying the surviving family members. His resignation, demanded by Mayor Jim Kenney and announced Thursday, was unexpected fallout of that shameful chapter. It has since been disclosed that those remains were not destroyed because a subordinate apparently disobeyed Farley’s instructions.

Farley’s ouster leaves Philadelphia with the same problem as the other jurisdictions that have lost top health leaders: a big hole at a bad time. Not only has the pool of potential recruits grown smaller, but the job of navigating a city through a pandemic also requires expertise, relentless energy, political savvy, and nerves as tough as steel.

Lori Tremmel Freeman, CEO of the National Association of County and City Health Officials, keeps adding to the spreadsheet where she tracks the turnover, 250 and counting.

“It can be very, very challenging to find a replacement,” she said. “Sometimes it depends on the size of that health department. A big one probably has a greater ability to pull in a deputy. But some positions are open for months and months. These are difficult jobs. You can’t just be a doctor. You have to be well-rooted in community and public health.”

Kenney has named Cheryl Bettigole, the current director of the health department’s Division of Chronic Disease and Injury Prevention, to serve as interim health commissioner while the city conducts a national search for Farley’s permanent replacement.

But even a knowledgeable insider might not have a commissioner’s connections to health systems, medical groups, pharmacies, and so much more, Freeman said.

“When you have turnover of a leader, you’re losing a lot of connectivity,” she said. “It’s a very hard thing to build back up. And it’s so important in a pandemic because it’s all hands on deck.”

Although Farley has not complained of personal threats against him or his family, many other public health officials — including former Pennsylvania Health Secretary Rachel Levine, now part of the Biden administration — have been attacked on social media and in state legislatures and other public forums over their handling of the pandemic.

An August article by Kaiser Health News and the Associated Press described a slew of examples. New York City’s health commissioner, Oxiris Barbot, resigned after months of clashes with City Hall over reopening schools and businesses. California’s public health director was ousted over a delay in reporting virus test results. Both the state health commissioner and state epidemiologist were replaced in Oklahoma. Ohio’s state health director, Amy Acton, who faced armed protesters at her home, resigned after months of pressure from Republican lawmakers.

Philadelphia Deputy Health Commissioner Carolyn Johnson resigned in January after giving advantage to Philly Fighting COVID in a bidding process to run the city’s largest vaccination clinic.

Farley, too, had been under pressure. While Kenney said on Friday that he thought Farley “did a terrific job with the pandemic,” some in the business community considered Farley’s control measures draconian, and he was sullied by the Philly Fighting COVID debacle.

And all that was before the news of the MOVE remains that spelled his dismissal.

“The thing about these jobs, the people in them are not infallible,” Freeman said. “You have to make tough decisions every day, and hope it’s right. None of us is perfect. This will haunt Dr. Farley, despite all the collective good work he did in the department and with his team.”

Taking over the health department of the poorest large city in the country during a public health crisis may not sound appealing. But it could be the opportunity of a lifetime for the right candidate, said Julie Morita, executive vice president of the Robert Wood Johnson Foundation and a former Chicago health commissioner.

“I don’t think the public has ever before appreciated public health the way they do now,” she said. “The pandemic and the racial unrest we experienced last year did really underscore the importance of structural inequalities in health care,” such as the lack of paid sick leave, health insurance coverage, and access to high-quality care and transportation to get there.

And now, through federal pandemic relief packages, local health departments have money to take on some of these challenges — at least as they relate to COVID-19.

In public health circles, Philadelphia is known for its innovative approach to the major health challenges many cities face, which could help the city attract a new commissioner, said Joshua Sharfstein, vice dean for Public Health Practice and Community Engagement at the Johns Hopkins Bloomberg School of Public Health. He previously served as health commissioner for Baltimore and then Maryland.

For instance, Philadelphia was among the first to establish a soda tax, applauded as a means to raise funds for childhood programs while limiting soda consumption.

Whoever takes the job next will have an important role: mending a damaged relationship between Philadelphia and its residents at a time when trust in public health is critical for rounding a corner in the pandemic.

Too often, governments attempt to “build trust” with residents by holding a forum and inviting the public to join. “Getting feedback from the community” often means telling people what administrators want to do and listening to a critique of the plan, Morita said.

Instead, public health leaders should meet people where they are, in their own neighborhoods, to hear what they think are the biggest health challenges and what should be done. Contact tracing during the pandemic is an opportunity to strengthen that kind of relationship, Morita said, especially if health departments rely on community groups to serve as a liaison.

“When there isn’t a pandemic, those relationships will help us,” she said. “There’s a lot of work that needs to be done, not just during a crisis.”

Staff writer Laura McCrystal contributed to this article.