When the Democrats swept into power in November in Delaware County, Pennsylvania, for the first time since the Civil War, one of the first things on their agenda was to create an agency the county has never had — a health department.

With a population of more than 560,000, this densely packed collection of towns west of Philadelphia is one of the largest counties in the country without its own health department, and it has to rely on nearby counties and the already overextended state services headquartered two hours away in the state capital, Harrisburg.

But before they could get it off the ground, the coronavirus swept into Delaware County and quickly overwhelmed the first line of defense — three county workers, none of whom are doctors or have public health degrees or training, whose jobs are to dispense information on where to get things like vaccines and pass along health notices from the state.

Since then, Delaware County officials have been scrambling to protect their people from a virus that has sickened more than 300 residents and taken five lives, officials said.

"With no public health department, Delaware County lacked the infrastructure to respond to the initial cases," recently elected state Sen. Tim Kearney, a Democrat, told NBC News. "While the state's Health Department has been very responsive, this crisis highlighted the fact that health concerns are a local issue and need local people working on these issues who better understand the community. The lack of specific case information created confusion for our residents and health care providers."

Monica Taylor, who is vice chair of the County Council and holds a doctorate in exercise physiology, said that because the county doesn't have a health department, it is limited in its ability to help people who suspect that they caught the coronavirus or test them for it or to track down people who were in contact with them.

Full coverage of the coronavirus outbreak

So the county has done the only thing it can do — ask the state and neighboring Chester County for help.

"Chester County is doing an amazing job aiding us during this crisis," Taylor said. "They are performing all contact tracing, quarantining and isolation of those infected, organization of all health care networks and hospitals in the county."

Chester County officials also got Delaware County's call center up and running, Taylor said.

"Our contract with them does not have an end date, but they are only contracted to help us with COVID-19-related issues," Taylor said.

The state Health Department, which has a center in Delaware County, has been dispatching community nurses who work in the area to assist in the battle, department spokesman Nate Wardle said.

Kearney said: "Local Democrats have been calling for a county health department long before the coronavirus crisis. But for years, the Republican establishment said having a health department would raise taxes and be too costly. ... We are now seeing the costs of inaction."

Until January, Delaware County was run by a Republican machine that doled out patronage jobs not unlike the Democratic Machines that ran Chicago for generations.

"Cook County for Democrats is like Delaware County for Republicans," Democratic strategist Joe Corrigan said.

Corrigan said he suspects the real reason the Republicans objected was that "having a health department comes with federal and state oversight."

"When you run a county like a jobs programs for your friends and family, this was a level of scrutiny they didn't want to have to deal with," he said.

Andrew Reilly, a former member of the County Council and the former chairman of the county's Republican Committee, disagreed. He said it wasn't just about money, "although it was certainly a factor."

Back in 2009, Reilly said, county leaders hired Johns Hopkins University's Bloomberg School of Public Health to survey residents on the need for a public health department and to make a recommendation. "Johns Hopkins concluded that Delaware County was better served without a full-fledged county health department," he said.

Because the issue kept coming up, Reilly said, the county rehired Johns Hopkins to do an update, the results of which are pending.

Asked whether he regrets not having pushed for a health department, Reilly said no. "I was following the advice of Johns Hopkins," he said.

Beth Resnick, assistant dean for public health practice at Johns Hopkins, said Reilly "misrepresents our 2009 study purpose and findings" and passed along a copy of the summary of the findings.

"The study was not designed to address the question of whether Delaware County should establish a county heath department," it said.

Tom McGarrigle, a Republican former chairman of the County Council, said the council didn't leave Delaware County defenseless.

"With this outbreak, I'm not going to argue whether we need a county health department or not," he said. "But to say we don't have health services is just not true."

McGarrigle insisted that the county's Department of Intercommunity Health Coordination is staffed with a medical doctor and a nurse.

Taylor said McGarrigle was referring to Dr. George Avetian, the county's senior medical adviser, who works two days a week. The nurse, Taylor said, is Colleen O'Sullivan, who responds for people at the Government Center.

"She doesn't give guidance or messaging to residents or the community," Taylor said.

Taylor, who is a Democrat, said that after the election and before their swearing-in on Jan. 6, council members formed a working group to look into creating a real health department.

They met twice with the state Health Department, and their second meeting "was with the state heads of epidemiology and infectious disease to discuss the role our health department would be taking over from their departments," Taylor said.

But it generally takes 18 months to two years to get a real county health department up and operating, and they had a little over a month, she said.

Download the NBC News app for full coverage and alerts about the coronavirus outbreak

The 3,000 local health departments operating in the U.S. "have a fundamental and complex role as the front line for delivery of basic public health services to most of the communities in this country," according to the National Center for Biotechnology Information, which is part of the National Institutes of Health.

That includes programs like adult and childhood immunizations, restaurant inspections, tuberculosis testing, community outreach and health education. But in recent years, health departments "have greatly increased disease surveillance activities and are now at the center of many of the federal, state, and local emergency planning activities," it said.

In Pennsylvania, six counties — Allegheny, Bucks, Chester, Erie, Montgomery and Philadelphia — have their own health departments, Wardle said. So do four municipalities — Allentown, Bethlehem, Wilkes-Barre and York.

But in Delaware County, the local League of Women Voters has long insisted that the county needs its own health department because of the population density, the large immigrant populations and the high poverty rates in some areas.

In a December presentation, Rosemarie Halt, chair of the League of Women Voters' public health committee, and her colleagues noted that Delco, as it is commonly known, already has "significantly lower" health rankings and higher rates of infectious disease than neighboring counties.

"Our neighboring counties have Public Health Departments to target testing and prevention services to communities who are most at risk and have a high prevalence," the presentation states. "Those departments receive state and federal monies to do that work."