A deadly virus was spreading in China, killing 40% of its victims and threatening to burst into a major outbreak.

In the U.S., the pandemic preparedness team at the White House’s National Security Council was tracking it daily, even as President Trump took office in those early days of 2017.

The NSC team, called the Directorate for Global Health Security and Biodefense, had led the country’s preparations for months, coordinating health agencies, the State Department and even the Pentagon to prepare for its spread to the U.S.

That virus, H7N9, never did.

Less than three years later, its successor — the novel coronavirus — broke out. But by then the directorate had been dismantled by the Trump administration.

As a consequence, the pandemic response is now being steered by non-scientists: Vice President Mike Pence, Health and Human Services Secretary Alex Azar, and even the president’s son-in-law are jostling for control of a response marred by confusion and delays.

It is unclear how the outbreak would have played out if the group had still been intact. But without a team that was trained to handle just such a pandemic — drawing on its experiences from SARS in 2002, H1N1 in 2009, Ebola in 2014, Zika in 2016 — the United States was left without a vital rudder, experts and former NSC officials said.

A war-room-like command center would have compelled action across disparate agencies to form a coherent and swift response, they say.

“It’s pretty clear that, by not having an authoritative personality in the White House who understood what was at stake, the United States will pay a huge price,” said J. Stephen Morrison, the director of the Global Health Policy Center at the bipartisan Center for Strategic andInternational Studies, who last year warned of the need to reinstate the directorate.

“No one on high had the strategic urgency to see the bigger picture and say, ‘We damn well better move rapidly, because if we don’t, the consequences are going to be disastrous,’ ” Morrison said.

The elite group was trained to distinguish the magnitude of a microscopic threat. It was meant to cut through red tape among agencies, pushing officials to detect and isolate the first U.S. cases to prevent spread. Backers say the team could have foreseen key problems, including testing roadblocks and gear shortages, that have worsened the crisis.

The decision to disband the unit was made by then-national security advisor John Bolton. At the time, an NSC spokesman said the change was intended to reduce bureaucracy and streamline offices with similar missions. The administration was still strongly committed to pandemic preparedness, the spokesman said.

The National Security Council did not respond to inquiries from The Times.

A report by the Center for Strategic andInternational Studies in November urged that the Trump administration restore the directorate, saying the authorities currently in place were insufficient to address a global health threat.

“It remains unclear who would be in charge at the White House in the case of a grave pandemic threat or cross-border biological crisis,” the report warned.

The coronavirus may have already been spreading.

Last month, when Trump was asked about the directorate’s elimination, he called the inquiries “nasty” and said he knew nothing about it. But he also justified the layoffs of scientific experts as efficient: “I’m a business person — I don’t like having thousands of people around when you don’t need them. When we need them, we can get them back very quickly,” he said.

Critics say that was a fatal mistake and contributed to the rapid spread of the virus. More than 557,000 Americans in 50 states have tested positive for coronavirus, and more than 22,000 have died.

“It’s like watching in slow motion. It all could have been different,” Morrison said.

The NSC has included health security experts as part of its mission since at least the Clinton presidency, though their influence has varied with each administration. The pandemic response team was formalized into a directorate in 2016 under President Obama.

With headquarters in the executive building directly east of the White House, the NSC had the experience and authority to track biological threats and help extinguish them before they spread.

The team included several of the world’s leading biosecurity experts: Beth Cameron, a PhD biologist who had spent years leading a weapons of mass destruction program at the Pentagon; Dr. Luciana Borio, an infectious disease physician who headed the Food and Drug Administration’s work on emerging threats; and Rear Adm. R. Timothy Ziemer, a U.S. Navy helicopter pilot whose tenure leading the U.S. malaria initiative drove down the world’s malaria deaths by 40%.

The unit had three main duties: provide constant surveillance for a quick pandemic response, unify government agencies under one command, and ensure that the White House conveyed scientifically sound information to the public.

One of its main sources for disease intelligence was provided by the Centers for Disease Control and Prevention, where a 24,000-square-foot emergency operation center is staffed around the clock to monitor real-time reports of potential outbreaks around the world. Digital screens cover the walls, using maps and intelligence feeds to evaluate early signals that a pathogen is taking hold in humans.

But the CDC lacks authority to compel action, so it needs a megaphone: scientists right in the executive office of the president, who “already have the president’s ear,” said Andrew Weber, who served as Obama’s assistant Defense secretary for biological threats.

In 2009, at the urging of national security experts, the Obama administration declared a public health emergency 11 days after the first U.S. case of H1N1 was detected. By contrast, during the coronavirus outbreak, it took Trump more than seven weeks after the first U.S. case to declare a national emergency.

Also during H1N1, Obama and members of the Public Health Service took to the podium at least twice a week for months. The CDC worked in tandem, inviting reporters to seminars in Atlanta, urging them to help combat false news.

During the coronavirus outbreak, Trump and Azar have continually contradicted experts. When Nancy Messonnier, the head of the CDC’s respiratory disease program, announced that community spread was not a question of “if” but “when,” Trump rebutted, saying the country could soon be down to “just one or two people” left with the virus. Messonnier has not conducted a public briefing since March 9.

“The White House should be clearing its messaging with scientists, not the reverse,” said Lawrence Gostin, director of the World Health Organization Collaborating Center on National and Global Health Law. “It’s a tone-deaf move that makes the public worry that this is political and that they aren’t getting unvarnished, evidence-based advice.”

The National Security Council’s team was designed to spring into action in crises. During the Ebola outbreak, NSC staff oversaw an intense operation to transport infected Americans in isolation units back to care facilities in the U.S.

The coronavirus response, by contrast, has been plagued with coordination problems from the start. Pentagon and Health and Human Services officials sparred over where a flight carrying Americans fleeing Wuhan, the epicenter of the outbreak in China, should land, even as they were airborne. Later that month, HHS staff were haphazardly sent to military bases without proper protective gear to greet Americans from China, a whistleblower said in a complaint.

The National Security Council played a proactive role in 2013 as well. After a novel coronavirus began circulating in Saudi Arabia, agency scientists held a closed-door meeting with top U.S. hospital officials to gauge gaps in the country’s preparedness. They returned to Washington with a plan to expand specialized treatment chambers and train infectious disease nurses.

Similarly, when H7N9 ramped up in late 2016 — the lethal strain of avian influenza that had begun resisting drugs in China — the National Security Council unrolled plans years in the making. They coordinated preparations with the Pentagon, brought in State Department officials to discuss diplomacy, and enlisted the CDC to seek out early genetic information about the strain to design new vaccines and treatments.

“The NSC’s job tends to be thinking from the 30,000-foot level: Where are the seams? What could happen in the weeks and months ahead that nobody else is thinking about?” said Cameron, who served on Obama’s Ebola task force and then led the directorate.

A 69-page pandemic “playbook” written by the directorate in 2016 attempted just that, detailing how to procure vital supplies during an outbreak. But that guidance has gone disregarded as the coronavirus response runs short of masks and ventilators. “You know, we’re not a shipping clerk,” Trump said.

Diagnostic testing has also revealed a stark contrast in approaches toward pandemic response. During H1N1, the Food and Drug Administration coordinated with the CDC to approve a diagnostic test less than two weeks after the first case was detected in California. But during the coronavirus outbreak, delays in testing supplies and approvals have left the United States exponentially behind other nations.

Trump said the challenges they faced were due to “uncharted territory.”

“Nobody knew there would be a pandemic or an epidemic of this proportion,” he said last month. “I would view it as something that just surprised the whole world. And if people would have known about it, it could have stopped.”

Health experts agree with his final point: It could have been.

“In a national security crisis, the president needs experienced generals by his side. He needs the brightest minds in biological threats to advise him,” Gostin said. “And now, we are faced with one of the seminal biological events of the century, and they can’t decide who’s in charge.”