LONDON — Once again, the world shuddered at news about President Trump. This time, it wasn’t something he had said or done, but rather the announcement that he had tested positive for the coronavirus.
Mr. Trump is not the first world leader to be infected. Prime Minister Boris Johnson of Britain and President Jair Bolsonaro of Brazil both tested positive. Mr. Johnson ended up in an intensive-care unit where, he said later, “things could have gone either way.”
But Mr. Trump, 74, is older and at higher risk than either of those men. And the news of an American president contracting a potentially lethal virus carried global repercussions beyond that of any other world leader. Financial markets fell in Asia and looked set to open lower in Europe and the United States.
Expressions of concern and good wishes for Mr. Trump’s speedy recovery — as well as that of the first lady, Melania Trump, who was also infected — poured in from officials in India, Britain and other countries.
“Wishing my friend @POTUS @realDonaldTrump and @FLOTUS a quick recovery and good health,” Prime Minister Narendra Modi of India said on Twitter.
Mr. Johnson said on Twitter: “My best wishes to President Trump and the First Lady. Hope they both have a speedy recovery from coronavirus.”
Some commentators noted that it was a grim reminder of a virus that does not distinguish between rich and poor, weak and powerful. The United Nations Office for Disaster Risk Reduction tweeted, “Nobody is immune from #COVID19.”
In Myanmar, a Baptist minister who met with Mr. Trump in the Oval Office last year and told him about oppression and torture by the military, said that having Covid-19 could help the president better understand the pain of others. “There are many critics of Trump regarding Covid-19,” said the minister, Hkalam Samson. “Now, he is suffering himself and he should be compassionate for his people by now.”
Wang Huiyao, the founder and president of the Center for China and Globalization, an influential research group in Beijing, said, “When the president of the United States, the most powerful person in the world, can catch this, the virus has no boundaries.”
For allies and adversaries alike, as they woke up on Friday to the news of Mr. Trump’s infection, the immediate concerns involved security as the world’s most powerful nation confronted the potential incapacitation of its commander-in-chief.
The United States has a well-established chain of succession if the president is unable to fulfill his duties. But the spread of the virus within the White House complex — and the close proximity of Hope Hicks, the aide who first showed symptoms of Covid-19, to Mr. Trump and others in his circle — raised worries about how many other top officials may be at risk, including Vice President Mike Pence.
Mr. Trump’s erratic style has itself been a recurring source of anxiety, according to several analysts. Some said the major worry was not about continuity of government — given the depth of contingency planning in the United States — but how the president would react to enforced confinement and the specter of illness.
“This highlights that what has always been destabilizing about Trump’s administration is not really his policies — it is him,” said Jeremy Shapiro, an Obama administration national security official who is now research director at the European Council on Foreign Relations. “In this sense, the worry from foreign governments will likely be its effect on the president’s fragile psyche.”
Britain’s experience shows that even in a country with a well-organized political system, a leader’s sudden illness can be deeply unsettling. When Mr. Johnson contracted the virus in March, the government was adrift for several days while he struggled to keep leading the response to the pandemic, via Zoom calls, from isolation in his official residence on Downing Street.
When Mr. Johnson, 56, was admitted to the hospital and then to intensive care, he deputized the foreign secretary, Dominic Raab, to act in his absence. But that did little to dispel the uncertainty, especially since unlike in the United States, there is no legal line of succession if a prime minister dies in office or is permanently incapacitated.
The government issued upbeat but unrevealing reports of Mr. Johnson’s health, and after he was released from the hospital on Easter Sunday, he disclosed that his condition had been more grave than was reported.
In Brazil, Mr. Bolsonaro’s bout with the virus was less serious. He said he suffered only mild fever and body aches before testing positive on July 7. After quarantining on the grounds of the presidential residence in Brasília, he pronounced himself recovered on July 25, posting a photo of himself smiling and giving a thumbs up.
Mr. Bolsonaro, 65, who has adopted Mr. Trump’s approach of playing down the virus and promoting miracle cures, appeared to brandish a box of hydroxychloroquine pills, the anti-malaria medicine. Despite claims by Mr. Trump, there is growing scientific consensus that the drug is not effective in treating Covid-19.
Inevitably, given Mr. Trump’s history of playing down the virus, there was an element of “I told you so” in some of the reactions abroad.
In China, which Mr. Trump has blamed as the source of the virus, the news set off an online firestorm, and within an hour had rocketed to the top of the most-searched topics on Sina Weibo, a popular though heavily censored social media platform.
The commentary reflected a mix of sympathy, disbelief and even celebration from some who saw the development as just retribution for Mr. Trump, who is widely seen in China as having spearheaded the recent downward spiral in relations between the United States and China.
“The whole world rejoices!” read one comment on Sina Weibo that was liked 55,000 times in the hour after it was posted.
Hu Xijin, the chief editor of The Global Times, a nationalist Chinese state-owned tabloid, put it in brash terms. “President Trump and the first lady have paid the price for his gamble to play down the COVID-19. The news shows the severity of the US’ pandemic situation,” Mr. Hu tweeted. “It will impose a negative impact on the image of Trump and the US, and may also negatively affect his reelection.”
Others took the opportunity to ridicule Mr. Trump.
“Covid, stand back and stand by,” wrote Raphael Bob-Waksberg, an American comedian, in a viral tweet, referring to comments Mr. Trump made about a far-right militant group.
Radoslaw Sikorski, a former foreign minister of Poland who is now a member of the European Parliament, wrote on Twitter, “Mr. President @realDonaldTrump, I suggest you do not try to treat yourself with bleach.”
Mark Landler reported from London and Mike Ives from Hong Kong. Reporting was contributed by Keith Bradsher and Claire Fu from Beijing; Elaine Yu and Yonette Joseph from Hong Kong; Carlos Tejada from Seoul, South Korea; Amy Qin from Taipei, Taiwan; Steven Erlanger from Brussels; Saw Nang from Mandalay, Myanmar; and Richard C. Paddock from Bangkok, Thailand.