In the last few years, the China-watching community has whiplashed from the unshakable conviction that China’s rise will be inexorable to the equally certain conviction that Beijing is a dangerous strategic competitor whose decline poses major risks to the United States and its allies. The truth may be somewhere along the spectrum between hot and not, but either way, Washington hasn’t a clue what to do about it. But the Middle East may provide a path forward.

Yes, the part of the world where strategic success goes to die actually presents a menu of policy options for managing the People’s Republic. Hear me out.

On the military side, Beijing has made enormous strides in recent decades. The People’s Liberation Navy is now the world’s largest naval force in ship numbers, with nuclear submarines and aircraft carriers, and a shipbuilding pace that puts the United States to shame. Its air force is modernizing at an alarming rate, with substantial help from plans stolen from the United States. It’s also pushing hard on cutting-edge hypersonic weapons, stealth aircraft, unmanned vehicles, and more accoutrements of a serious modern military. And with ability has come ambition: China is determined to subjugate some of the Pacific’s most trafficked waterways into its own private pond.

On the economic side, China has been nothing less than a marvel, with thanks to the opening encouraged and facilitated by the United States. Hundreds of millions have been lifted out of poverty, and odds are you bought something made in China in the last week. GDP per capita went from $54 in 1952 to $9,732 in 2018. Since 1979, real GDP growth averaged 9.5 percent a year, “the fastest sustained expansion by a major economy in history,” per the World Bank, notwithstanding a major deceleration since 2007. All to the good.

But China’s meteoric rise and its now worsening slowdown brings risks, both internally and externally. Internally, growing wealth has masked destabilizing inequality, and has fueled the increasingly dictatorial Xi Jinping’s grip on absolute power. Globally, Beijing’s economic might has fostered a sense of impunity in Beijing, and quiescence from many—viz the South China Sea or the battle over Huawei going on today.

So how to manage this dangerous, necessary behemoth? War is clearly not the answer. Absent a major Chinese blunder (invading Taiwan, attacking U.S. forces), there is no casus belli. Of course, there’s a military component to containing the Chinese threat, particularly in the South and East China Seas. Nor, pace Donald Trump, is all out economic battle a wise course. Thanks to the global trading system, the PRC is an integral part of the world economy. It cannot be walled off like North Korea, or crushed like Venezuela. Nor should it be. Rather, the right answer is to build a new system of incentives, using—dare we say it—carrots and sticks to help move China away from the malign and dangerous. This may seem a blithe prescription but that’s where lessons from the Middle East come in.

For the last half-century, the United States has confronted an endless series of military, political, and economic threats from the Middle East. Think the post-1973 oil embargo; the Arab boycott of Israel; the complex threats from state-sponsored and salafi-driven terrorism; nuclear and missile proliferation; Iran; Iraq; Syria. The list is too long to enumerate. And outright victories are few and far between. But oddly, there are plenty of tactical successes, and together those tactics can be built into a containment and guidance strategy for the PRC.

The Arab secondary boycott of Israel is a case in point. The brainchild of the Arab League, the boycott leveraged the economic buying power of the entire Arab world and refused business to any company that did business in Israel. This was no small game: Hilton, Coca Cola, Toyota, and many of the behemoths of industry were targeted. The U.S. Congress made compliance with the boycott illegal for U.S. companies. What’s a China analog? Simple. Companies engaged at the behest of Beijing in human rights violations in China, Hong Kong, and elsewhere can also be blackballed, tossed off global exchanges, excluded from indexed funds, blocked from doing business with U.S. firms, and otherwise drummed out of polite economic society.

A similar strategy has been applied to Iran with enormous effect. Remember, in the case of China, the goal is not to drive the economy to a point where Beijing screams uncle. Rather, the point would be to disincentivize engagement with companies that engage in intellectual property theft, cybercrime, or oppression, or support the Chinese military in operations against civilians in Hong Kong, for example.

Ditto the blackballing of senior officials. Even before Magnitsky sanctions came into force, the United States regularly used immigration authorities given to the president to block from the country senior officials engaged in human rights abuses, proliferation, and terrorism. It also blocked transfers of foreign goods with substantial U.S. components from being transferred to malign end users. There’s no reason, U.S. officials reasoned, why American aircraft manufacturers should supply spare parts to Iranian airlines that funnel terrorists to Syria and missiles to Hezbollah. Nor was there any reason Saddam Hussein’s thugs should have access to U.S. banks.

In that vein, the Justice Department this week announced charges against four members of the People’s Liberation Army for the 2017 Equifax hack that exposed the personal data of 145 million Americans. Does the PLA have investments that have an American nexus? Block them. Do the companies recently sanctioned by the U.S. government for abetting surveillance in Hong Kong and Xinjiang enjoy U.S. investments? (They sure do.) Limit that. Does Huawei have American suppliers? Same.

Asia hands, particularly those who argue that the time is long past for the United States to pivot away from the Middle East, will counter that the People’s Republic of China is no Iran. That’s true, and China’s might and competitiveness are formidable. But this isn’t about punishing Beijing with a hammer. This is about taking a scalpel to Bad China, separating it to some extent from Better China, blocking the most malign parties’ access to the benefits of global commerce and acceptance in the community of civilized nations, and disincentivizing trade and trafficking with those who are complicit in China’s destructive agenda.

It won’t work perfectly, it may not even work well. But it’s a step in the right direction, practically and morally. And, absent capitulation or some major change in China’s leadership, there are no better options.

Danielle Pletka is a senior fellow at the American Enterprise Institute and is also the Andrew H. Siegal professor in American Middle Eastern Foreign Policy at Georgetown University's Center for Jewish Civilization.

Photograph of press conference announcing indictments of members of the Chinese military in the Equifax hacking case by Sarah Silbiger/Getty Images.