Boeing this week took the drastic step of shutting down all its plants in the Puget Sound region, an unprecedented move sparked by the death of an employee who had the novel coronavirus, which has infected more than 30 of its workers.

But in St. Louis and other sites across the country, where Boeing builds fighter jets, tankers and drones for the Defense Department, it was business as usual, with workers punching the clock as they normally do.

While stores and factories around the country are shutting down and millions are teleworking from home, defense contractors have been, by and large, required to stay open, meaning most of the industry’s 2.5 million employees have continued to report to work, risking spreading the deadly disease the virus causes.

Last week, as states across the country issued orders requiring businesses to close in a drastic attempt to prevent the spread of the virus, the federal government issued instructions to defense contractors that directly contradicted those local efforts. The order came after the defense industry lobbied Congress and the Pentagon to give it special dispensation because it is vital to the nation’s security.

“As a result of Covid-19, the aerospace and defense industry is under severe financial and operating pressure that worsens with each passing day,” Eric Fanning, president and CEO of the Aerospace Industries Association, wrote in a letter to leaders of the House and Senate on Friday, urging Congress to pass legislation that would designate defense industries “ ‘essential’ for the purpose of gaining exemptions from state and local orders.”

That same day, Undersecretary of Defense Ellen Lord issued a memo saying just that — declaring the defense industry met the Department of Homeland Security’s definition as a “critical infrastructure sector” and as a result, companies are “expected to maintain their normal work schedules.”

In an interview, Fanning said that being declared essential was not the same as an order forcing plants to stay open. Factories in hard-hit areas may need to close, he said.

“The public health needs and the safety of the workforce are always paramount,” he said. “But we want to make sure we are protecting the industry and companies that employ people, so when we get through this crisis, the jobs are still there and we can get the economy back up and running as quickly as possible.”

But some defense workers and the unions that represent them are pushing back against the directive, saying the best way to serve national security is to defend against the spread of the disease, not make people go to work.

Paul Black, president of the machinist union in Fort Worth that represents workers at Lockheed Martin’s F-35 Joint Strike Fighter manufacturing plant, said company officials were doing “the best they can under the circumstances” to keep employees safe. But he learned Tuesday that one worker had tested positive for the virus, joining about 70 others in the county, which has ordered residents to stay home and has had one death related to the virus.

“I blame the federal government for the fact that they’re still open,” he said. “I wish the people up there on Capitol Hill would get busy and be proactive and shut it down for a couple of weeks and give them time to do a deep cleaning.”

Union leaders representing General Dynamics workers at the Bath Iron Works in Maine said the workforce is being used “as sacrificial lambs to meet the needs of our customer.”

Temporarily closing the plant would not hurt national defense, they wrote. “What could be devastated is the health and well-being of BIW employees, their families and the American people,” they wrote to company officials. “We implore you to do the right thing, close your facilities and pay your most valued possession so they can maintain some semblance of life during this crisis.”

The union was supported by the leaders of the state legislature, who said the factory could become a hot spot for the virus. And they urged the state’s congressional delegation to press the Pentagon to reconsider its mandate.

“If there were an outbreak at BIW, or any shipyard, it could not only jeopardize the health of the individuals, but also the availability for that facility to continue operations,” the state legislators wrote. “We understand they are critical infrastructure, and maintaining that critical infrastructure requires the people who make it possible to stay healthy.”

Maine reported 118 confirmed cases Tuesday, heightening fears. “Many people I hear from are really worried about going to work at BIW,” said Assistant Senate Majority Leader Eloise Vitelli. She said she didn’t think the factory needed to be shut down but hoped the Pentagon would give “flexibility in deadlines and work processes so they can take the appropriate measures to help prevent the spread.”

The companies, however, said they have no choice — the Pentagon is their main customer. It sets the rules. And if it says to stay open, they have to stay open. Over the weekend, an employee at the plant tested positive for the virus, Dirk Lesko, the president of General Dynamics’ Bath Iron Works plant, wrote in a letter to employees.

He said the company has “taken decisive action to quarantine and monitor employees, and we have increased our cleaning of facilities using the best available guidance from federal, state and local authorities coupled with common sense.”

But he added that the work would continue: “We remain open because the President of the United States and the United States Navy has mandated that we do so — that the work we do is so essential to the defense of our nation that we must not shut down.”

Last week, James Geurts, an assistant Navy secretary, wrote Lesko to say that “delivering or redelivering our ships to the fleet is a national need that is unwavering and crucial to our national security.”

He urged the company to ensure “the safety and well-being of the workforce” but added that the shipbuilding needed to continue: “I cannot stress enough the importance of accomplishing this mission.”

But not all defense sites are staying open. Boeing included two major Pentagon programs in its two-week Puget Sound shutdown — the KC-46 tanker aerial refueling jet and the P-8 maritime patrol aircraft.

And earlier this month, as the coronavirus ransacked Asia and then Europe, Lockheed Martin temporarily closed its plants in Japan and Italy, where workers assemble the F-35 Joint Strike Fighter.

The company shut down its assembly plants abroad in consultations with those governments, and they were closed for a short amount of time. Japan’s plant was closed for a week, Italy’s for just a couple of days for a deep cleaning.

“But here the order is to stay open and continue,” said a company official, who spoke on the condition of anonymity because he wasn’t authorized to discuss the matter publicly.

The Pentagon’s directive treats almost the entire industry as essential even though companies are working on different weapons systems that will be ready at different times — and in some cases won’t be ready for use for months or even years.

“Clearly weapons systems like the F-35 are not as time sensitive to national defense — it’s not like they roll off the production line and go right into combat,” said Todd Harrison, a defense analyst at the Center for Strategic and International Studies. “You don’t want to paint with too broad a brush in terms of what is critical and what is not.”

If the defense industry were to shut down completely, it would not only cause a disruption in the nation’s ability defend itself, but also send ripple effects through the economy that would take a long time to recover from, said David Berteau, president and chief executive of the Professional Services Council, a trade group representing federal contractors. And once the nation’s military industrial complex ceases production, it can be difficult to get it back up and running again.

When the federal government goes through budget shutdowns, Berteau said, it hits contractors hard: “For every day they were closed, it took three to five days to get back to where they would have been had not they not closed in the first place.”

Wes Hallman, a senior vice president at the National Defense Industrial Association, said he was particularly worried about small businesses that have unique products.

“I’m not worried about our big companies,” he said. “But on the supply chain, that drills all the way down to mom-and-pops, where there are one or two suppliers of capabilities. Should they go away, they’re likely gone forever.”

Black, the union official in Fort Worth, said some workers fear that if the plants do close, they’ll end up joining the expanding ranks of the unemployed: “For every person calling for the place to shut down, there is someone else saying, ‘I need my money. I need my job.’ ”