President Trump’s war on official Washington began almost the minute he took office. Since his inauguration, he’s proposed steep cuts to department budgets, including the Centers for Disease Control and Prevention. His team sowed chaos with dramatic reforms at agencies like the State Department (which he called the “Deep State Department” on Friday). He’s left a huge number of positions unfilled: The Pentagon alone has a record number of civilian vacancies. His loyalists have tried to spy on and scapegoat career officials, who are not tied to any party or president, at the National Security Council.

This war has taken on greater intensity since Trump’s acquittal in the U.S. Senate’s impeachment trial last month. Last week, he fired Russell Travers, the acting director of the National Counterterrorism Center and a decades-long member of the intelligence community, and his deputy, in an apparent campaign to root out what he’s called the disloyal “snakes” in government.

The Travers incident would be worrisome even before the coronavirus was spreading dramatically and the stock market was crashing. But it makes clear Trump remains as dedicated to his war against government as to the one against the pandemic. Although the president tweets about being at “war” against the disease, Trump will struggle to get the people and policies to win it as long as he remains obsessed with his Washington purge.

Trump and his loyalists have long claimed to be beset by a “deep state,” and it’s true the president has met resistance — in bureaucratic brinkmanship and leaks like the anonymous New York Times op-ed. Trump is far from the first president to face intrigues, but his response has been singular, particularly since the impeachment proceedings, in which several civil servants gave what he saw as damaging testimony. Upon the Senate’s acquittal, Trump took revenge, using a disloyalty list to oust some of those players and others across the Pentagon, Treasury Department, NSC and intelligence community.

This sort of purge is undermining government at a time when it is needed most.

Even though the White House has rightly promised a “whole-of-government” pandemic response, which requires all agencies — including national security departments — working together, the government is far from whole. More than two-thirds of the top jobs at the Department of Homeland Security, which plays a key role in domestic response, are vacant or filled by acting officials. The Department of Health and Human Services and other agencies are similarly shorthanded. A hunt for disloyalty makes it harder to find qualified people to fill these jobs and keep the other positions filled: It’s no wonder the White House has resorted to hiring college students.

The loyalty tests also have made it hard to simply offer advice, leaving many of the best minds in public health and other policy howling on Twitter and cable news. Tom Bossert, who served as the administration’s first homeland security adviser and oversaw much of the government’s biosecurity portfolio, reportedly tried to advise the White House as the crisis built but his calls were blocked by officials in the administration.

A purge in government also makes it harder to develop the best policies. Unforeseen crises are opportunities for new voices and new ideas to be heard, but people speak up only when they trust giving honest advice will not hurt their careers.

Clearly that is not the case in Washington: trust is the first casualty of a snake hunt. That’s one reason so many former officials are worried about the message the purge and its dismissals will send to those remaining in the ranks of the intelligence community. (Nine former intelligence chiefs wrote a public letter about this Friday.) It’s also why so many meetings with Trump on coronavirus begin with praise. Even as testing lagged behind, CDC Director Robert Redfield said the most important message he wanted to deliver during the president’s tour of the agency’s Atlanta headquarters was to thank the president for his “decisive leadership.” Unless they bend a knee, advisers know their advice may fall on deaf ears or their tenures be cut short.

Although much still is to be learned about Trump’s stubborn and stilted response to the coronavirus pandemic, it is not hard to see the purge’s damage in the dysfunction so far. All the missteps and misstatements suggest loyalty has too often carried more weight than expertise. The president’s Oval Office address to the nation two weeks ago was just one piece of proof. Trump’s son-in-law and senior adviser, Jared Kushner, who reportedly sought advice from a relative’s Facebook group, led the drafting. It was Kushner who apparently advised Trump not to declare a “national emergency” in his remarks: one of many mistakes that had to be corrected in the speech’s aftermath. Kushner reportedly set up a “shadow task force” of loyalists and private advisers that is sowing confusion among the government’s existing experts and Trump’s panel for fighting the pandemic.

Trump is not the first to mistakenly prioritize government loyalty over its performance. Before George W. Bush launched the Iraq War, Defense Secretary Don Rumsfeld publicly rebuked and sidelined Army Chief of Staff General Eric Shinseki, who told Congress the war effort would require a much bigger force than planned. Rumsfeld also sought to remove reconstruction team members because of their previous work for Democrats. Colin Powell’s State Department was viewed as soft and insufficiently committed to the mission; its insights were ignored. The disaster in Iraq had many causes, but purity tests were among them: They suggested to those in government something was more important than winning the war. The war was lost anyway, along with the lives of thousands of Americans and hundreds of thousands of Iraqis.

Amid a spiraling pandemic, that death toll is an object lesson. How history judges Trump’s handling of coronavirus will depend not on how those in government feel about the president but how they perform in the weeks and months ahead. With the health of millions and his own legacy on the line, Trump must realize he has to pick his battles and the one that matters is not with the government but with the virus that threatens so much.