U.S. President Donald Trump’s protectionist threats against China have spurred much concern. If he follows through on his promises and, say, officially labels China a currency manipulator or imposes higher import tariffs, the short-run consequences — including a trade war — could be serious. But, in the longer term, a turn toward protectionism by the United States could well be a blessing in disguise for China.

There is no doubt that China is going through a difficult phase in its development. After three decades of double-digit GDP growth — an achievement with few historical parallels — the pace of China’s economic expansion has slowed markedly. The combination of rising labor costs and weaker demand for its exports has reduced China’s annual GDP growth to 6.9 percent in 2015 and 6.7 percent last year. The Chinese government has now lowered its growth target for 2016 to 2020 to 6.5 to 7 percent.

This is still a respectable pace, but it is not the best China could do. As Justin Yifu Lin and Wing Thye Woo have noted, in 1951, when Japan’s per capita income relative to that of the U.S. was the same as China’s is today, Japan was experiencing sustained growth of 9.2 percent.

One impediment to such growth for China is a heavy debt burden. A stress-test analysis by the McKinsey Global Institute found that if China continued to pursue its debt- and investment-led growth model, the ratio of nonperforming loans (NPLs) could rise from 1.7 percent today (according to official figures) to 15 percent in just two years. That said, the risk of NPLs is not news to the People’s Bank of China, which will, the evidence suggests, take steps to mitigate it.

Unfortunately, debt isn’t China’s only problem. Its dominance in global exports — the main engine of its growth in recent decades — has eroded. India’s trade-to-GDP ratio overtook China’s last year. And, while labor productivity is rising steadily in China, it remains less than 30 percent of advanced-country levels.

Given these challenges, it may seem strange to assert that China may now be on the verge of ascending to a new level of global influence. But, because of Trump’s policy approach, China has a new and important opportunity to do just that.

While trade and capital flows require regulation, openness, on balance, does vastly more good than harm. Trump’s “neo-protectionist” policies — which aim to limit the flow of goods, services and people to the U.S. — are rooted in nothing other than myopic xenophobia. In the end, this will isolate the U.S. far more than China or Mexico.

History bears this out. On the eve of World War I, Argentina was among the world’s wealthiest countries, behind the U.S. but ahead of Germany. Since then, Argentina’s economy has deteriorated substantially for two reasons: inadequate investment in education (a mistake that Trump may also make) and heightened protectionism.

The rise of nationalism in the 1920s culminated in 1930, when far-right nationalist forces overthrew Argentina’s government. The new government — which was bitterly opposed to liberalism, not to mention foreigners — raised tariffs sharply in several sectors. On average, import tariffs rose from 16.7 percent in 1930 to 28.7 percent in 1933. Jobs in traditional sectors were saved, but productivity declined. Today, Argentina is not even among the top 50 economies worldwide.

So Trump’s policy approach can be expected to do great damage to the U.S. economy and have far-reaching implications, given America’s prominent global role. But self-imposed economic isolation, combined with an inward-looking “America First” foreign policy approach, will also create space for other countries — including China, India and Mexico — to increase their own international clout.

Consider Trump’s withdrawal from the Trans-Pacific Partnership, the mega-regional trade deal involving 12 countries in the Asia-Pacific region, but not China. The TPP certainly had its flaws — not least that it would have conferred disproportionate and unfair benefits on large corporations. But it had plenty of redeeming qualities, and was being celebrated in countries like Malaysia and Vietnam for the access it would give to the U.S. market.

Now that the rug beneath these countries’ feet has been pulled out, China can lend a helping hand. Already, China has boosted its regional investments considerably, including through its “One Belt, One Road” initiative. Without the TPP facilitating capital flows among its member countries, China is likely to overtake the U.S. as the largest source of foreign direct investment for the ASEAN countries. China is also seeking to deepen its economic ties with TPP signatories Australia and New Zealand.

Likewise, China has seized the opportunity afforded by Trump’s ill-conceived plan to build a wall on the U.S. border with Mexico to reach out to America’s southern neighbor. Just over a month after Trump’s election, Chinese State Councilor Yang Jiechi met with Mexican Foreign Minister Claudia Ruiz Massieu, pledging to deepen diplomatic ties and increase flight connections and trade. China is already Brazil’s top trading partner. It can now aim for the same position in Mexico, and perhaps all of Latin America.

As Trump adopts increasingly closed-minded and xenophobic rhetoric, Chinese President Xi Jinping is toning down his nationalist language and sounding increasingly like a global statesman. China, he seems to recognize, now faces the chance not just to achieve another round of economic expansion, but also to secure a far more prominent role in global decision-making and policy.

Kaushik Basu, a former chief economist of the World Bank, is a professor of economics at Cornell University. © Project Syndicate 2017