“Personally, it’s like watching the decline of the Roman Empire,” said Mike Bradley, the mayor of Sarnia, an industrial city on the border with Michigan, where locals used to venture for lunch.

Amid the pandemic and in the run-up to the presidential election, much of the world is watching the United States with a mix of shock, chagrin and, most of all, bafflement.

How did a superpower allow itself to be felled by a virus? And after nearly four years during which President Trump has praised authoritarian leaders and obscenely dismissed some other countries as insignificant and crime-ridden, is the United States in danger of exhibiting some of the same traits he has disparaged?

“The U.S.A. is a first-world country but it is acting like a third-world country,” said U Aung Thu Nyein, a political analyst in Myanmar.

Adding to the sense of bewilderment, Mr. Trump has refused to embrace an indispensable principle of democracy, dodging questions about whether he will commit to a peaceful transition of power after the November election should he lose.