Two weeks ago, China’s foreign minister, Wang Yi, pleaded with the United States to step back from the brink and find ways to work together. Just days later, he complained to his Russian counterpart that the United States had “lost its mind, morals and credibility.” The question now is what China can do about it. The Trump administration’s broad assault on China has left its leadership with few options that would not threaten a complete breach in relations. If that happened, it could leave Beijing even more isolated at a time when China is also clashing with India, Britain, Canada, Australia and many other countries. It could also hurt the Chinese economy when it is already reeling from the coronavirus pandemic and the global fallout.

The order on Tuesday to close the Chinese Consulate in Houston with only 72 hours’ notice was only the latest action by the administration that has infuriated officials in China. In a matter of weeks, Beijing has endured a stepped-up campaign against its 5G wireless technology, sanctions against officials overseeing Hong Kong and the largely Muslim region of Xinjiang, and now accusations that China has dispatched scores of soldiers under cover to steal commercial, military and even medical secrets.

A spokesman for China’s foreign ministry vowed again on Thursday that the government would retaliate in kind to the closure. He dismissed the administration’s accusations as “a malicious smearing.”

On Friday, Beijing hit back, telling the United States it must shut down its consulate in Chengdu, the westernmost of the five American consulates in mainland China.