By Greg Ip

If you think U.S. relations with China have gone downhill, just look at Australia's.

In April, Prime Minister Scott Morrison called for an international inquiry into the origins of the new coronavirus. China, the inquiry's presumed target, was quick to retaliate: It imposed 80.5% tariffs on Australian barley, banned imports of beef from four Australian slaughterhouses and warned Chinese citizens against traveling to the country. Australia was called "this giant kangaroo that serves as a dog of the U.S." in the Global Times, a nationalist Chinese newspaper.

What two years ago was mostly a confrontation between China and the U.S. is becoming a broader showdown with the advanced democracies. Other countries were already worried about China's pursuit of technological dominance, discriminatory trade practices, geostrategic assertiveness and domestic repression. Those worries intensified this year with China's alleged lack of candor early in the coronavirus pandemic and its imposition of a national security law on Hong Kong.

Britain is now weighing whether to exclude China's Huawei Technologies Co. from its 5G telecommunications network after saying it could participate. Japan has offered subsidies to companies to reshore supply chains from China.

The European Union just levied landmark tariffs against Chinese-subsidized companies based outside China. This month, the Inter-Parliamentary Alliance on China was formed, bringing together China-skeptic legislators from across the political spectrum in a dozen countries: Britain's Labor and Conservatives, Germany's Christian Democrats and Greens, and in the U.S., Democrats and Republicans.

This is welcome news for the Trump Administration, which has long sought to rally its allies to help contain China's technological and military ambitions. In a recent overview of its China strategy, the National Security Council declared: "The United States will work with our robust network of allies and like-minded partners to resist attacks on our shared norms and values, within our own governance institutions, around the world, and in international organizations."

What has emerged thus far, though, is not a coalition led by the U.S. but ad-hoc actions by individual countries. And as Australia discovered, crossing China can be costly. In the last decade China has used sanctions to punish Norway after the Nobel committee (based in Norway) awarded a Chinese dissident the peace prize; Mongolia for hosting a visit by the exiled Tibetan spiritual leader, the Dalai Lama; South Korea for installing a U.S. anti-missile defense; and Canada for arresting a Huawei executive at the request of the U.S.

In a recent article, Richard McGregor, a China expert at Australia's Lowy Institute, a think tank, says China has used access to its market to further its foreign policy since the start of communist rule. "The difference now is that China wields real economic clout," he wrote. "Other countries didn't fear Chinese sanctions in the 1950s. They do now."

China seldom explicitly links its sanctions to foreign-policy goals. This provides "deniability and the flexibility to escalate and de-escalate at will," Ely Ratner, executive vice president at the Center for a New American Security, told Congress in 2018. China said its tariffs on Australian barley were the result of an anti-dumping investigation.

China also plays off its trade partners against each other. In this it has been aided by the Trump Administration's unilateral approach to trade, which has included hitting allies with tariffs on national-security grounds and negotiating one-on-one with China. During its trade war with the U.S., China raised tariffs on lobster from Maine, while simultaneously cutting tariffs on lobster from Canada. Australia worries the U.S. and China's "phase one" trade pact will shift Chinese purchases of agricultural goods from Australia to the U.S. Indeed, just as China was restricting imports of barley from Australia, it was opening to imports of barley from the U.S.

Yet China's tactics may be turning less potent and potentially counterproductive. Australia has yet to buckle. China's detention of two Canadian citizens and economic sanctions have not brought the release of the Huawei executive but instead have turned Canadian public opinion overwhelmingly against China.

Chancellor Angela Merkel has been reluctant to push China away, in part because Germany needs a hedge if Mr. Trump carries through on threatened tariffs on German cars, said Thorsten Benner, director of the Berlin-based Global Public Policy Institute. Yet Ms. Merkel has faced pressure from Norbert Roettgen, an influential legislator and fellow Christian Democrat, to exclude Huawei from German telecom networks.

No U.S. ally wants to "decouple" from China, or to drastically cut economic ties, as some in the U.S. advocate. China is far more important to most of their economies than it is to the U.S. But neither do they want to let China's assertiveness go unchecked, which brings them into closer alignment with the U.S. irrespective of who is president.

China doesn't want to decouple, either: It needs other countries' knowledge, products and markets. The challenge is reconciling those trade ties with behavior that other countries believe destabilizes the global order. "China has to be careful up to a point in imposing sanctions: they don't want to harm their own economy," Mr. McGregor said. Yet "they are fighting on all fronts and seem to have the sense they can prevail."

Write to Greg Ip at greg.ip@wsj.com