Sign up for our special edition newsletter to get a daily update on the coronavirus pandemic.

Remember when Chinese paramount leader Xi Jinping closed the doors to the Middle Kingdom to all foreigners, and America’s liberal opinionmakers erupted with accusations of racism and xenophobia?

Me neither, but it happened: No more foreign devils!

China banned foreign visitors entirely, effective 12:01 am Saturday. For now, the Western finance bros and consultant types who profited from business with the totalitarian regime can’t go kowtow at the Forbidden City. And maybe we should thank Xi, for taking the key step toward disentangling our economy from China’s.

For decades, the United States and other Western powers traded our industrial strength and technology for access to China’s burgeoning markets and cheap consumer goods. Wall Street and a few large firms enjoyed this arrangement, as did American princelings like Hunter Biden, who until October sat on the board of a Chinese fund whose shareholders include many Communist-state-owned enterprises.

The Westerners returned from whirlwind business trips, gushing about the spanking new airports, fast trains, obedient workers and competent bureaucrats. Now these elites, who made China a powerhouse, wait out coronavirus in their Hamptons bunkers. They should use the time to reflect on what engagement with China meant meant: global supremacy delivered to the Beijing regime on a plate, with a “thank you” note.

The Chinese term for “crisis,” weiji, contains the same character as jihui, “opportunity.” The Communist Party is seizing this opportunity by spreading lies and attempting to dominate the coronavirus narrative — from conspiracy theories about the US Army creating the virus to “Go, China!” posters in Italy.

Never mind about America trying to lead the world with the counternarrative of truth. For now, our priority should be to just stop being China’s business colony, dependent on the anti-Western children of Mao Zedong for essentials.

We must bring back production of pharmaceuticals and medical devices, while rethinking our global trade arrangements to prioritize democratic allies in East Asia and elsewhere.

This is a matter of life and death now. Over the last two months, China nationalized foreign mask producers and demanded rock-bottom prices for all medical equipment, creating a shortage in the rest of the world. The industrial conglomerate 3M, for example, saw most of its protective masks built at a factory in Shanghai bought up locally even before the outbreak, and afterward the Chinese gripped and “effectively nationalized” the firm’s capacity, as White House trade czar Peter Navarro put it. This may be a good strategy for China but our country can’t be subject to the Communist Party.

A Communist Party official newspaper recently threatened that if China withheld medical supplies, America would “sink into the hell of a novel coronavirus epidemic.” Utterances like these aren’t made without approval from the top, even if the Beijing’s envoy in Washington sounds conciliatory. Many party officials and Chinese businesspeople have friendly feelings toward the US, but not the supreme leader, Xi, and the worse he treats America, the better he looks in the eyes of his nationalist subjects.

China has been the best single country for production and offers the second largest consumer market in the world. But we foolishly put all or nearly all our eggs in one basket, a basket completely controlled by a totalitarian regime determined to make the world bend to its will.

And there are now better, friendlier alternatives: In fact, Vietnam, Malaysia and Thailand are pulling ahead of China in “total cost-factor competitiveness”; the United Arab Emirates offers great tax incentives. Developing the Americas, from Mexico to Brazil, should be another priority. This process will be painful and costly because the best factories are now all in China, but it must happen for the sake of American economic independence.

President Trump’s greatest achievement was pausing America’s slide into becoming an economic tributary state of the Chinese Communist Party. His challenge now will be resisting calls to drop tariffs, which many will argue are preventing economic recovery.

We don’t know how long the ban on foreign entrants to China will last, but we do know the Sino-American rivalry is permanent and intractable. It’s time we acted like it. Our business elites might not get to enjoy the Peninsula Shanghai or Beijing St. Regis while they grovel before Commie officials, but it’s time to stop being useful idiots.

Nels Frye writes from Boston.