The U.S. president is hospitalized with a virus he refused to treat as a grave threat, in the final weeks of an election whose results he will not pledge to accept, as the nation confronts a struggling economy, an unyielding pandemic and racial unrest.

The combination of these crises has plunged the United States into a vortex of potential vulnerability that national security experts said is probably without precedent.

Consumed by its own difficulties, the country is in a poor position to respond to provocations by adversaries, advance its foreign policy interests with support from allies, or serve as a credible model of functioning democracy, former senior national security officials said.

“I see weakness and division and above all else distractedness,” said Nick Rasmussen, who served as director of the National Counterterrorism Center in the Obama and Trump administrations. “Any problem anywhere else is just a third- or fourth-order problem right now because we are so self-absorbed, inward looking and consumed with our own toxicity. And when you’re distracted, you make mistakes.”

The fallout spread swiftly over the weekend, radiating outward from the president. More than a half-dozen White House aides, Republican lawmakers and senior operatives have also tested positive for the novel coronavirus after flouting health protocols at public events, triggering panic in quarters of the West Wing and forcing the Senate to shut its doors to prevent further spread.

The outbreak came as members of Trump’s national security team faced accusations that they were using their positions to ensure his reelection.

Director of National Intelligence John Ratcliffe was excoriated by his predecessors last week for declassifying discredited intelligence reports supposedly implicating Hillary Clinton in an effort to “stir up a scandal” against Trump in 2016 involving Russia. Secretary of State Mike Pompeo was rebuffed in his effort to secure a meeting with the pope by Vatican officials who reportedly regarded his approach as an election ploy to please Catholics. And Attorney General William P. Barr was accused of being the source of unsubstantiated claims of voting irregularities cited last week by the president.

“In a normal government, you could probably absorb some of this dysfunction,” said John McLaughlin, a former acting director of the CIA who now teaches at the Johns Hopkins School of Advanced International Studies. “But this government, on national security policy, has had a very sketchy — to say the least — process for making foreign policy decisions.”

Another former senior official, speaking on the condition of anonymity to avoid direct criticism, said the actions of Ratcliffe, Barr and others were no surprise, given the patterns of the past nearly four years.

“This is the Trump administration,” said the former official, who also faulted the news media for its focus on Trump as the be-all and end-all of world affairs.

Beyond the chaos at the White House, some affairs of state are ongoing. Pompeo, having returned Friday night from his trip to the Vatican and Greece, was due to leave again Sunday for a two-day visit to Japan. The State Department announced that visit would go ahead, although it said without explanation that other stops on what was to be a longer trip had been postponed.

Defense Secretary Mark T. Esper has been on a tour of North Africa and the Middle East since last week, and on Sunday was in Kuwait.

McLaughlin and others emphasized that the country’s main adversaries do not appear poised to test the United States, in part because of their own apprehensions about the vote, now just 30 days away.

Russia and, to a lesser extent, China are already seen as interfering in the U.S. election with relative impunity. And Iran has yet to follow through on its vow of further retaliation for the U.S. drone strike in Baghdad in January that killed Iranian Maj. Gen. Qasem Soleimani.

But the leaders of those countries, as well as North Korean leader Kim Jong Un, could be reluctant to challenge the United States more forcefully in the coming weeks out of concern for the impulses of an ailing president or the potential consequences from a future administration led by Democratic nominee Joe Biden if he is elected.

“Some adversaries may think that America may be distracted, so that they can get away with something,” said Stephen J. Hadley, who served as President George W. Bush’s national security adviser. On the other hand, he said, they may think a provocation “could give Trump an opportunity to be presidential, to be commander in chief, and that strengthens his hand with the American people.”

“I think that is probably the thinking of China, I think it’s probably the thinking even of [Russian President Vladimir] Putin, I think it’s true for the Iranians,” Hadley said. “They’re just going to hunker down and get through this period and see who’s elected.”

Trump’s admission to Walter Reed National Military Medical Center on Friday was met with expressions of sympathy and support from foreign leaders including British Prime Minister Boris Johnson and Putin, who sent a telegram saying he was sure that Trump’s “inherent vitality, vigour and optimism will help you overcome the dangerous virus.”

Putin himself has been far more cautious about his personal safety, spending the last six months in virtual isolation at a country estate outside Moscow. Most of his meetings have been via videoconference. Those who visit in person reportedly must first quarantine for 14 days and obtain a negative coronavirus test result. On arrival, they must pass through a “disinfectant tunnel” to the residence, where strict social distancing is maintained.

Outside Putin’s bubble, Russia on Sunday reported 10,499 new cases in one day, the first time since mid-May that its daily number has exceeded 10,000. With total infections during the pandemic totaling 1.2 million, Russian authorities have reported an overall death toll of 21,358. Britain and France, where the virus is again spiking, on Saturday also posted record high rises in the daily number of cases.

Current and former U.S. officials said that Trump’s infection was widely seen overseas as a direct consequence of his troubled handling of the pandemic and part of a broader, disturbing pattern of perceived incompetence and turbulence.

“There’s been a steady series of emails just repeatedly asking, at repeated junctures, ‘What in the world is going on?’ ” said a former senior U.S. intelligence official in frequent contact with counterparts. Trump’s refusal to wear masks or abide by other protective measures has baffled foreign officials, the intelligence official said, describing Trump’s symptoms as an “extraordinary manifestation of the obtuseness of his approach to the coronavirus.”

This official and others emphasized that they believe that the U.S. military and intelligence agencies remain focused on overseas threats and are functioning well despite the turmoil in Washington.

“People can have confidence that the U.S. military and intelligence community at a professional level are doing their jobs and keeping an eye on everything and sounding alarms that need to be sounded,” McLaughlin said. “But into what environment? A very distracted and confused one at this point.”

While all voiced concern for Trump’s condition and said they hope for his recovery, several national security veterans said they have contemplated whether the United States would be better equipped to respond to a global crisis if Trump were forced to surrender his duties as president. The White House has said that is not under consideration, and Vice President Pence, who has tested negative for the virus, has scheduled a full week of on-the-road campaigning.

Hadley said he did not see U.S. national security as particularly vulnerable at the moment. “In some measure, it is too soon to tell. We really don’t know what the president’s condition is . . . and the other great uncertainty of course is whether . . . Biden will take a test today, tomorrow or the next day, and it will come up positive.”

Depending on who wins, he said, the riskiest time will be between the election and the inauguration when “what somebody might do wouldn’t be seen as trying to influence the outcome of the election, because all the votes would have been cast.”

“In many ways, that’s the more serious time of vulnerability and distraction. I’m more worried about that right now,” Hadley said.