China is blowing the geopolitical opportunity of a lifetime. There has probably never been a better moment to undo America’s greatest strategic advantage by dividing the United States from its global network of democratic allies, many of which are horrified by President Donald Trump’s rhetoric and policies and deeply worried about Washington’s staying power. Yet Beijing is doing its best to remind the world that it has far more to fear from a hegemonic China than from an erratic America.

The latest example is China’s response to the detention of Meng Wanzhou, the chief financial officer of Huawei, in Canada. The timing of that arrest, on charges of violating bank laws and U.S. trade sanctions, surely struck Chinese officials as suspicious. It came on the same day Trump met with President Xi Jinping in Buenos Aires, amid high U.S.-China tensions in an ongoing trade war. Yet — some unwise comments from Trump notwithstanding — there is no indication that this was anything other than a legitimate effort to enforce U.S. laws that Huawei had broken. Canadian authorities simply would not have made the arrest otherwise.

The New York Times described China’s official reaction to Meng’s arrest as “measured.” In reality, it has been anything but. Beijing has responded with a modern form of hostage-taking, detaining two Canadians (and, according to reports on Wednesday, possibly a third) on what appear to be spurious charges. The hawkish, quasi-official newspaper Global Times has implied that citizens of other “Five Eyes” countries (the U.S., U.K., Canada, Australia and New Zealand) might face the same treatment. Arrest one of ours, China is saying, and we’ll snap up two of yours.

From a Chinese perspective, this approach has its logic. Accustomed to a justice system that is wholly politicized, Chinese officials surely believe that Meng’s arrest was simply an American pressure tactic. That perception was no doubt heightened by Trump’s remarks suggesting that Meng might be released as part of a trade deal, by the president’s ongoing efforts to politicize the U.S. justice system, and by well-known U.S. and Western concerns that Huawei is an arm of Chinese intelligence.

China’s decision to target Canada, rather than the U.S., is also superficially strategic. The idea is to punish smaller, weaker countries for cooperating with Washington, and thereby make them think twice about doing so in the future. That logic, however, is deeply flawed, and it risks squandering the remarkable geopolitical opening that China has been given.

America’s allies — Canada especially — are profoundly worried about where the U.S. is going. A wildly disruptive and often hostile president has slapped punishing trade tariffs on democratic allies based on nonsensical “national security” concerns. He has flagrantly disrespected allied leaders, even lashing out on them on their own soil.

The U.S. alliance system, which provides Washington with global influence and advantages its competitors can only envy, is going through its sternest test in decades. Western leaders — including Canada’s prime minister, Justin Trudeau — have been openly speaking about cultivating deeper economies ties with China as a hedge against relying on an increasingly unreliable, predatory U.S.

What should China do in this situation, given that it apparently seeks to displace the U.S. as the primary power in the Asia-Pacific region, and perhaps globally as well? A smart, subtle strategy would emphasize playing nice with America’s allies — de-escalating bilateral disputes, playing down Chinese geopolitical ambitions in the Asia-Pacific and beyond, avoiding coercive or heavy-handed diplomacy and otherwise striving to appear the very picture of moderation in comparison to Trump’s abrasively unilateral America. Also it should ostentatiously advertise Beijing’s support for the liberal international order (as Xi did, however implausibly, at Davos in 2017) and ease back from some of the predatory economic and financial practices that have generated international unease. In short, it would let the U.S. destroy the system and squander the advantages it has built over many decades.

But instead, Beijing is behaving in ways that should remind every democracy just how much it would hate living in a Chinese-dominated world. It is showing that an increasingly empowered China will be a China that feels unconstrained in seizing foreigners on even the most dubious pretexts, and in subjecting them to the same arbitrary justice to which it subjects its own citizens. It is making democratic countries (Canada especially) think very hard about whether China is a plausible partner after all.

And this isn’t the only instance in which Beijing has recently advertised its more brazen, authoritarian inclinations. Chinese authorities have conducted extralegal kidnappings in Hong Kong, Myanmar, Thailand and other locales to force the return of exiled dissidents to China. Beijing has repeatedly engaged in economic and diplomatic coercion of countries that dare to speak out against its suppression of civil liberties and basic human rights. It has also worked assiduously to undermine democratic systems overseas by suppressing free speech and bribing or otherwise co-opting key political actors, while supporting authoritarian regimes from Southeast Asia to Latin America and building the world’s most technologically sophisticated police state at home. And all this in addition to advertising, more explicitly than at any time in decades, China’s desire to take center stage in the world and offer a global alternative to liberalism.

At a time when so many international observers worry about the danger Trump poses to the liberal international order, China is giving plenty of evidence that it is by far the greater threat.

Why is a country that, for decades, followed Deng Xiaoping’s strategy of hiding its capabilities and biding its time now acting in such a counterproductive way? The first reason is that this is what rising powers do. Countries on the make — especially those who insist, as Chinese leaders do, that the existing order is biased against them — invariably reach a point where they can hardly help behaving more provocatively. With growing power comes a decreasing willingness to suffer slights that once had to be suffered; the attraction of flaunting one’s capabilities and confidence before the world becomes irresistible. This is just what happened to Germany under Kaiser Wilhelm II, the country to which China is so often compared.

The second reason is that China is simply manifesting the pathologies of authoritarian statecraft. There is no hermetic seal separating foreign and domestic affairs. To the extent that they can get away with it, powerful autocracies almost always end up behaving internationally as they behave at home: In a thuggish and domineering fashion that defies international law and accepted norms. China’s foreign minister openly advertised what was coming back in 2010, when he told a gathering of Southeast Asian nations that “China is a big country and other countries are small countries, and that’s just a fact.”

China’s hostage-taking may be shocking, but it is hardly surprising. Beijing is acting just as one should expect a rising, ambitious autocracy to act. That’s bad news for the Canadians being held prisoner. But it’s also a useful warning to the democratic world.

Bloomberg Opinion columnist Hal Brands is the Henry Kissinger distinguished professor at Johns Hopkins University’s School of Advanced International Studies and senior fellow at the Center for Strategic and Budgetary Assessments.

KEYWORDS China, Canada, Huawei