After an initially fractious allied response to China’s COVID-19 failures and Hong Kong crackdown, Western nations appear to be acting with greater unity in presenting a response to Beijing. The best hope to restrain the misbehavior of a rising power grown confident, even arrogant, is consistent and coordinated pressure, designed with an off-ramp to encourage negotiation and compromise.

Chinese President Xi Jinping’s government has sacrificed whatever goodwill it gained from its success against COVID-19 and limited aid to Europe, even as the Trump administration’s efforts to coerce allies to act against China often backfired. Beijing went from negligence and recklessness to brutality and criminality with its treatment of Hong Kong. Continued mass repression in Xinjiang, dubious territorial claims in the South China Sea, and a violent clash with India added to the hostile balance.

Although Trump administration credibility remains minimal, many Asian and European states increasingly share the U.S. criticism of China. On Hong Kong, in contrast to on COVID-19, the G‑7 issued a critical statement as individual countries consider what specific policies to take.

Several governments, led by the United Kingdom, offered to welcome Hong Kongers seeking to flee as the city faces the harsh embrace of mainland law. Many countries have canceled previous extradition agreements.

The European Union’s foreign minister, Josep Borrell, said the organization was working on a united response, likely to include export bans on sensitive technology, extradition limits, and expanded visas for Hong Kongers. Of course, some countries remain reluctant to tangle with China: Germany’s response has been tepid, and South Korea, still smarting from the economic pain inflicted by China over anti-missile deployment, refused to join Washington in denouncing Beijing’s Hong Kong policy. Nevertheless, other governments have taken a tougher approach. London decided to reverse course and ban the Chinese company Huawei from participating in its 5G infrastructure buildout. And after the killings in the Galwan Valley, the mood in India is fiercely anti-China, matched with app bans and economic measures by the government.

Although these actions are unlikely to cause Beijing to retreat, they illustrate a way forward for democratic and industrialized nations. They need concerted action to penalize The Chinese government while offering an escape opportunity for its victims. If frequently though prudently pressed, this approach could help constrain if not contain China, tempering its willingness to misuse its growing power.

Collective action, beginning with diplomatic and economic measures, has several advantages. One is to magnify the impact of even modest individual responses. If the top dozen or so Western economies restrict visas and bank access to Chinese officials, the impact might be more than symbolic. The United States, Europe, and Japan acting in concert to address adverse commercial and trade practices likely would force Beijing to address issues without a trade war. Multiple nations welcoming Hong Kongers increases the options for productive, energetic people while reducing capital and economic growth passed through to the mainland. A demarche from China’s most important economic partners insisting on greater transparency regarding the COVID-19 outbreak would defuse claims that the call for transparency is but an American political ploy.

Moreover, coordinated action would buttress governments more vulnerable to Chinese retaliation. It would be more difficult for Beijing to single out any one actor, and other nations could collectively respond to any Chinese attempt to target the weakest link. The demonstrated willingness of nations to act would encourage more vigorous action by isolating governments tempted to stand aside and leave the work to others. Even starting slow and small would be beneficial, helping to prepare countries for what could be more serious crises to come.

It would make sense for major Western countries to establish an ongoing consultative mechanism to consider how to best respond to China. The coronavirus outbreak was unexpected and surprised the United States and most European nations. Hong Kong had fallen into a predictable stalemate when Beijing unexpectedly and dramatically broke the deadlock by imposing the new national security law.

Even more dangerous and rushed could be the need to respond to an armed clash in the South China Sea or nearby waters, an intimidation attempt against Taiwan that rapidly escalated, or a serious confrontation between the United States and China. An early but strong allied response might avoid a later military reaction or escalation. Swift action would be most likely if countries had developed a regular communication channel and cooperated before.

Normally one would look to the United States for leadership. However, in the short term at least, that may prove difficult. The Trump administration has squandered American credibility, and its own. Washington has gone out of its way to offend natural allies, especially in Europe. So bad is the trans-Atlantic relationship that European leaders have continued to lean toward Tehran rather than Washington in response to the latter’s demands that they join its so-far failed campaign of maximum pressure on Iran. In mid-July, U.S. Secretary of State Mike Pompeo expanded sanctions on Germany—an extraordinary assault on a longtime ally—in an attempt to halt the Nord Stream 2 natural gas pipeline from Russia.

U.S. President Donald Trump has also ostentatiously turned relations with Beijing into a campaign issue, designed to aid his reelection. Few American allies are eager to see that prospect, and they are unlikely to subordinate their policies to someone widely seen as willing to wreck the international order to advance his electoral prospects.

Nevertheless, the Nov. 3 U.S. election could provide an answer, either a new president or secretary of state, and in any case a less election-minded administration. Washington needs to relearn how to negotiate and persuade, rather than to dictate and insist. Broad, responsible, workable cooperation will take time to develop.

Reaching agreement on issues as broad as China’s crackdown on human rights, its territorial aggression, Beijing’s drive for technological dominance, and the disputes in the Asia-Pacific will be difficult. Finding genuine solutions—actions likely to achieve results, as opposed to being the international equivalent of virtue-signaling—will be even tougher. Nevertheless, cooperating to reach broad agreement on coordinated action is much more likely to shape Chinese behavior than the sort of hysterical huffing and puffing that characterizes the Trump administration. Equally important, creating a form of international accountability for action would help weed out truly bizarre and counterproductive proposals, such as the talk of banning visas for Chinese Communist Party members and their families—tens of millions of people.

China poses a substantial challenge to the United States and the West more broadly. However, the future is not set: China faces enormous economic, demographic, and political obstacles itself. Moreover, Xi will not rule forever, and a future leadership could return to a more responsible, less confrontational path. But democratic states around the globe have a stake in restraining Chinese misbehavior, which has expanded in scope. So far, their efforts leave much to be desired—yet the signs of a new purpose are there. It is incumbent upon the United States to work with allied and friendly states to ensure that Beijing’s rise remains peaceful.