BEIJING — When the coronavirus epidemic began its relentless march around the world, China’s diplomats reacted harshly toward countries that shut their borders, canceled flights or otherwise restricted travel.
Italy was overreacting when it did so, Qin Gang, a vice minister of foreign affairs, told his counterpart in February. The United States was stoking fear and panic, a spokeswoman, Hua Chunying, said. “True feeling shines through in hardship,” she said back then.
Now China is doing the same, undercutting its own diplomatic efforts to win sympathy and support by imposing travel restrictions that it once called unnecessary. They include 14 days of quarantine for travelers from Italy, Iran, South Korea and Japan. Almost everyone flying into Beijing faces a similar fate, regardless of departure point.
“They have a toolbox that only seems to have a hammer,” said Jörg Wuttke, the president of the European Chamber of Commerce in China, who is now himself in quarantine in his Beijing home after returning from Europe last Friday.
The epidemic is first and foremost a public health crisis, having already caused more than 3,000 deaths, but for China, it has become a challenge to its standing at home and abroad, too. China faces a torrent of suspicion from other countries that could undermine its ambitions of becoming a global economic and political power.
China is now hitting back — it has expelled foreign journalists, attacked displays of racism, hinted that other governments are responding too slowly, and suggested that the virus originated elsewhere. The government has hailed friendly countries that sent supplies or stayed open to Chinese travelers and has also itself sent shipments of aid.
To the Communist Party’s critics, the epidemic has confirmed the harshest critiques of the flaws in its governance, including its intensifying authoritarianism under its leader, Xi Jinping, and its reflex for secrecy and obfuscation. With flights from around the world canceled, the near-isolation of the country could well compound the anger that has already boiled over at home, especially if the epidemic has a lasting effect on trade and tourism.
It has inflamed relationships that were already tense, like that with the United States, but also strained those with friendlier countries such as Russia. China has urged countries to work together, but lashed out at the United States and others, at least in part, it seems, to deflect public anger at home.
“The epidemic is a lost opportunity for China to rebuild some good will with America and other countries,” Susan L. Shirk, chairwoman of the 21st Century China Center at the University of California, San Diego, wrote in an email.
“Beijing is playing geopolitics with the epidemic,” Ms. Shirk wrote. “The domestic propaganda is hostile to the U.S. and emphasizing the superiority of the Chinese system and the wisdom of Xi Jinping.”
The intensity of the outbreak forced China to go on the defensive early, especially as the government failed to explain the delays in warning the public about the threat of the coronavirus, especially in Wuhan, the city where it began.
“Well, this is a new virus,” China’s foreign minister, Wang Yi, said in an interview with Reuters in February when asked about the delays. “So naturally it takes time for people to gain more understanding and knowledge about it. The same has happened in other countries.”
The epidemic has sparked a wave of xenophobia and anti-Chinese racism in Japan, Vietnam, Australia and countries in Europe and elsewhere, where some are asking if their economies are too dependent on China. Even Russia, which has grown closer and closer to Beijing, was among the first to shut its border and stop issuing visas, and China’s ambassador, Zhang Hanhui, complained about the treatment of Chinese on Moscow’s buses.
Around the world, the epidemic has been met with news coverage that questioned China’s public health standards, its one-party control and its suppression of dissent. Some Trump administration officials and members of Congress have argued that the crisis should force a more decisive reset in relations with China.
Chinese diplomats have pushed back. They attacked the displays of racist sentiment and, more broadly, tried to refute criticism of how the country has handled the outbreak.
China’s embassy in Berlin slammed the German newsmagazine Der Spiegel for a cover photograph that showed a man in a protective suit and mask, with the headline “Made in China.”
“Epidemic outbreaks must not be used as an excuse for discrimination and xenophobia,” the embassy’s statement said.
In the case of The Wall Street Journal, China’s Ministry of Foreign Affairs went further, expelling three journalists from the newspaper’s Beijing bureau over a headline on an opinion-page essay: “China Is the Real Sick Man of Asia.”
The Trump administration retaliated this week by announcing that it would cap the number of Chinese employees in the United States at five major state media organizations, including Xinhua and CGTN. That, in turn, prompted new accusations of hypocrisy from Ms. Hua, the Foreign Ministry spokeswoman, and a hint of still more tit-for-tat moves. “Now the US kicked off the game,” she wrote on Twitter, “let’s play.”
Ms. Hua’s use of Twitter, which is blocked in China, is a feature of a newly aggressive form of public diplomacy that has taken shape in the last year — and that is being put to the test now. Where China’s diplomats have long stuck closely to scripted responses couched in protocol, she and some of her colleagues have pushed back against critics, at times combatively.
Another Foreign Ministry spokesman, Zhao Lijian, even gave some credence this week to suggestions swirling on the internet that the coronavirus did not come from China by saying no one yet knew the origin for sure.
“They are trying very hard to fight both the diplomatic damage the virus has caused and the domestic damage this has done to Xi Jinping,” said Xiao Qiang, a researcher at the School of Information at the University of California, Berkeley, and editor of China Digital Times.
Now that the rate of new infections and deaths in China has slowed, officials are trying to portray the country as the world’s leader in the fight against the coronavirus. The Central Propaganda Department is even publishing a book — in several languages — praising Mr. Xi’s role in guiding the country through the crisis, however premature a declaration of victory might seem at this point.
At a briefing in Beijing on Thursday, officials highlighted the assistance China is now providing other countries. That includes sending coronavirus test kits to Pakistan, Japan, Iran and other countries. China’s Red Cross flew a team of volunteer experts to Iran, which has been particularly hard hit. It also chartered a flight to bring back Chinese citizens from Iran — a step it harshly criticized the United States for doing from Wuhan in January.
China’s Foreign Ministry is keeping score. Ma Zhaoxu, a vice minister of foreign affairs, said on Thursday that 62 countries had donated masks or protective clothing.
Myanmar provided rice, Sri Lanka tea. Mongolia donated 30,000 sheep, a gift that coincided with an official visit last week by its president, Khaltmaagiin Battulga. (Mr. Battulga and his delegation returned to their country and went into quarantine as a precaution.)
Mr. Zhao, the ministry’s spokesman, noted that 170 leaders had made supportive statements. Officials also repeatedly cite remarks by senior officials of the World Health Organization, who have praised the country’s response.
Rush Doshi, director of the China Strategy Initiative at the Brookings Institution in Washington, said that China’s effort to rewrite the narrative — by donating test kits and sending other aid — could pay off.
“If they provide public goods, this is going a long away, and these narratives are meant to help to accelerate that process,” he said. “And I think they may be successful at it if they are really going to show in a big way they are on the ground in a place like Iran, making a difference.”
China could also benefit from the shift in focus to other hot spots, especially in Italy. Fernando Simón, the head of Spain’s coordination center for health alerts and emergencies, told a news conference that “we have to progressively think that China is not the highest risk zone.”
Others, though, are skeptical that China can easily rebound from the taint of the epidemic.
“Resentment against China in Europe is palpable,” Mr. Wuttke of the European Chamber of Commerce said. He then referred to Mr. Xi’s signature Belt and Road investment strategy to unite the world through infrastructure and commerce, saying that this was “not the Belt and Road people hoped for. Tragic.”
Reporting and research were contributed by Katrin Bennhold and Melissa Eddy in Berlin, Raphael Minder in Madrid, Farnaz Fassihi in New York, and Claire Fu in Beijing.