China is in the midst of a massive propaganda campaign highlighting 40 years of “reform and opening”. But China today more closely resembles the Hotel California – you can check out anytime you like, but you can never leave.

That’s the takeaway from the unjust arrests of two Canadian nationals – Michael Kovrig and Michael Spavor – by China’s state security services. But the story goes much deeper, into the widespread crackdown on anything perceived as a threat to the Chinese Communist party (CCP), and what it means for America and its democratic allies.

The most recent incidents started in November, when Canada arrested Meng Wanzhou, the chief financial officer of the Chinese tech giant Huawei. The US Department of Justice was investigating sanctions violations by Huawei, which resulted in a warrant for Meng’s arrest and prompted US authorities to work with their Canadian counterparts to arrest Meng. Meng is now out on bail – living in her multimillion-dollar vacation home in Vancouver – as she awaits hearings about extradition to the United States. The United States and Canada are following the procedures of their independent legal systems, and Meng will have a chance to defend herself in court.

Sign up to receive the latest US opinion pieces every weekday

Days later, China arrested two Canadians in what appears to be direct retaliation for the arrest of Meng. The two Canadians are being held on charges of threatening national security, which is a catch-all term for anything the CCP doesn’t like. Anna Fifield of the Washington Post writes that this could “result in their imprisonment for months with no outside contact” in what is essentially a “legalized form of forced disappearance”. No legal “process” in China can be trusted as independent or fair.

This is President Xi Jinping’s China. Xi has expanded the country’s counter-espionage law so that the state security apparatus can more easily detain people. He is cracking down on civil society in what many describe as the worst repression since the 1989 massacres in Tiananmen and elsewhere. The CCP is imprisoning more than a million Uighurs and other Turkic Muslims in an ethnic cleansing campaign. And China is attempting to stifle criticism of the CCP abroad, pushing countries to extradite Chinese nationals who are viewed as threats to the CCP.

The recent unjust arrest of two Canadians makes clear that Beijing views foreigners as pawns in power politics

China is increasingly targeting foreigners. The restrictions China places on foreign businesses – forced technology transfer, limits on ownership – have long been a problem. But China also enacted a new law governing overseas non-governmental organizations (NGOs) that gives the CCP vast powers to punish NGOs for no good reason, including opaque categorizations such as “other acts that endanger national security or harm national or public interests” – a move that has had a chilling effect on many foreigners working in China. And while not the first time, the recent unjust arrest of two Canadians makes clear that Beijing views foreigners as pawns in power politics.

Competition with China is one of the greatest challenges facing the United States. Difficult policy challenges will require nuanced, pragmatic and tough responses that navigate a balance of pushing back and finding compromises; avoiding a new cold war while not permitting Chinese aggression.

No US strategy will work without relying on what makes America great – its democracy. When China accuses the United States and Canada of arresting Meng for the political purposes of constraining China’s power and hurting its tech companies, the United States should make clear that Meng will be treated according to the law. This is the message that the Canadian prime minister, Justin Trudeau, and foreign minister, Chrystia Freeland, have both rightly sent.

Facebook Twitter Pinterest Donald Trump has suggested he might use Meng Wanzhou’s arrest to bargain for trade concessions with Xi Jinping. Photograph: Nicolas Asfouri/AFP/Getty Images

But Trump played into the CCP’s hands by suggesting that he might use Meng to bargain for Chinese concessions on trade. Trump’s comments reflect his disdain for the rule of law, especially considering his attacks on US law enforcement over the investigation into Russian interference in the 2016 election. Trump’s comments are already undermining America’s case: China is seizing on his comments to claim that US leaders twist the law to further their own ends, and that America wants to keep China down by going after its companies. Meng will be able to use Trump’s comments in court to help her case against extradition, and China is successfully driving a wedge between the United States and Canada as Canadians wonder whether they should extradite Meng for fear that the case will be politicized.

More challenges like this will arise, and the United States must protect the integrity of its democratic system. As China increasingly attempts to use propaganda and other tools to influence politics in the United States, responding in ways that erode America’s institutions would undermine the very democratic norms that make America strong and that differentiate the United States from regimes like Beijing. Instead, America should respond with transparency, fairness and the rule of law, being careful to separate the CCP’s malicious activities from the mundane.

China claims that it is an open country that welcomes foreign engagement, and as Xi recently said, “going forward, China will … be even more open and inclusive”. But China’s actions are sending loud and clear signals that foreigners should come to China at their own risk. Forty years after its reform and opening began, China appears to be closing once more, and the consequences are becoming more dangerous. In the wake of the challenges from China, America must stand by its democratic norms and its democratic allies.