Australia, economically dependent on China, became one of the first countries to block Huawei Technology Co. on its soil, and led global calls for an investigation into China’s initial handling of the coronavirus. India, once a pillar of the world’s nonaligned movement, is expanding military cooperation with the U.S. and its allies as it fights with China over contested borders.

Europe now trades roughly as much with China as America, and is on the brink of concluding an investment pact with Beijing that would further deepen those economic links. At the same time, the continent has installed new barriers to Chinese acquisitions and technology.

The U.K. and France have chipped away at Huawei’s ability to compete in Europe, and while Germany remains cautious, debates there about Europe’s dependency on China are growing more heated. This summer, after Beijing curtailed freedoms in Hong Kong, EU countries unanimously backed sanctions, a once unthinkable step.

Foreign leaders cite complaints about the way Mr. Xi’s government initially handled Covid-19, its clampdowns on Muslim minorities in Xinjiang and democracy activists in Hong Kong and greater competition from Chinese companies that once were customers. China’s “Wolf Warrior” diplomacy, named after a nationalistic Chinese film franchise, has left many politicians and businesspeople feeling targeted.