In the wake of the global financial crisis of 2008, however, Beijing tried to keep its economy humming by ordering state banks to pump out new loans. More than half the increase in global debt over the past decade was issued as domestic loans inside China. There is now much more money circulating in China than in the United States, much of it in the hands of Chinese who are constantly on the watch for higher returns.

So China also faces a serious risk of capital flight. The last bout began in 2015, amid early indications that the Federal Reserve was going to start raising interest rates. China stopped that exodus by tightening its currency controls, but controls rarely work for long. Savvy locals find creative ways to get their money out.

This year, the Fed’s tightening has further strengthened the dollar, while Beijing’s easy money policies have further weakened the renminbi — increasing the incentive for Chinese investors to dump China’s currency for dollars. Right now Chinese can earn the same interest rates in the United States for a lot less risk, so the motivation to flee is high, and will grow more intense as the Fed raises rates further.

Beijing could also diminish the allure of the strong dollar by trying to raise the value of its own currency. But that would mean tightening the supply of renminbi, which is likely to derail the economy at a time when growth in China is already slowing under the burden of too much debt.

China has also tried to challenge the hegemony of the dollar by making the renminbi more widely popular, but that is a long-term project, so far unsuccessful. Though the United States share of the global economy is down to 23 percent from a high of 32 percent in 2001, the dollar is still by far the world’s favorite currency for everything from lending to paying for exports and imports.

More than 60 percent of the foreign currency held in reserve by central banks around the world is in dollars, and China’s ambition to make the renminbi a reserve currency has attracted hardly any takers. Global central banks and investors are still wary of holding a currency that Communist authorities may slap controls on at any time — as they did in 2016.

As this crisis unfolds, attention is likely to shift from the relatively small global threat posed by Turkey to the much larger one posed by China — and from President Trump’s tariff wars to currency wars. Though the Trump administration has accused China of weakening its currency to make its exports more competitive, over the past few days China has shifted to trying to prevent the renminbi — already down 7 percent against the dollar over the past two months — from weakening further. The last thing Beijing wants is a sudden crisis in confidence.