BEIJING — He usually went there for neon-orange jars of citron tea with honey, jumbo packets of dried seaweed, and cartons of eggs that seemed to be perpetually on sale, 15 for eight renminbi, or about a dollar.
But this time was different. Li Xin, a retired store owner, showed up at a Beijing branch of Lotte Mart, a South Korean supermarket chain, with a message.
“Get out of China!” Mr. Li, 66, a tall man in a fraying green parka, shouted at the entrance to a Lotte Mart store in central Beijing. “We don’t want traitors!”
A wave of anti-South Korean sentiment has broken out across China after the South’s embrace of an American missile defense system Washington began shipping this week that China says can be used to spy on its territory.
The government-controlled news media, in brassy editorials, has urged boycotts of South Korean products. Students, retirees and taxi drivers have led protests against South Korean businesses. Tourism officials have ordered several mainland travel agencies to cancel group trips to South Korea.
Frustrated nationalists have vowed not to eat kimchi or Korean barbecue. South Korean bands have been denied visas to perform in China, and South Korean shows have disappeared from Chinese television and streaming services.
The furor poses a test for President Xi Jinping of China.
On the one hand, Beijing is seeking to pressure South Korea to abandon the missile defense system, which officials see as a threat to China’s security.
On the other, Chinese leaders are eager to maintain good relations, especially as South Korea faces political uncertainty over the removal Friday of its president, Park Geun-hye, and the possibility that a candidate willing to reconsider the missile system could replace her.
The backlash against South Korean businesses has divided the Chinese. Some say it is necessary to counter American military might in Asia. Others warn against such nationalism, arguing that China should find more amicable ways of engaging South Korea, a close economic ally.
“Peace is most important,” said Liu Yuanyuan, 25, an employee at a German pharmaceutical company in Beijing. “Countries should not threaten one another.”
Much of the ire against South Korea has focused on Lotte, a conglomerate that operates 112 stores with some 13,000 employees in mainland China. The company, which entered China in 2008, has been overwhelmed with protests and scrutiny by the authorities since it agreed to provide land in South Korea for the deployment of the American antimissile system.
As of Thursday, the Chinese authorities had closed nearly half of Lotte’s stores on the mainland, citing safety violations, the company said in a statement.
One store was fined about $3,000 for using hand-radios that emitted “illegal wireless signals.” On Wednesday, the authorities ordered the monthlong closing of a chocolate factory jointly owned by Lotte and the Hershey Company of the United States after the results of a fire inspection.
Protests erupted again at Lotte stores this week after American officials announced that they had begun to install the antimissile technology, known as the Terminal High Altitude Area Defense system, or Thaad, in South Korea.
In Zibo, a city in the eastern province of Shandong, protesters held banners demanding that Lotte leave China. “The safety of our motherland cannot be violated,” a 30-foot banner read.
In Xuchang, a city in the central province of Henan, employees at a mall stood in rows holding banners protesting Lotte and singing the Chinese national anthem.
And in Beijing, there were scattered voices of discontent, including Mr. Li’s.
He said he had first heard about Lotte’s land deal on WeChat, a popular messaging app, where a petition calling the company a “traitor and enemy of the Chinese people” was circulating.
“I had a lot of hope for the future of China and South Korea,” he said. “Now I worry South Korea is changing.”
In Kunming, a southern city, students at Yunnan Minzu University posted a sign denouncing Lotte on the door of their dormitory.
“Seoul is tiny and insignificant!” the sign read, according to a photograph provided by one of the students, Liu Guomengchen, 21. “Empower my big China!”
Ms. Liu, who studies environmental design, said she would stop buying South Korean cosmetics and other goods.
“These things are totally dispensable,” she said. “China is becoming more and more powerful. Countries like South Korea and the U.S. see our rise as a threat, so they want to work together to weaken us.”
The Chinese news media has played a central role in fueling the protests. An opinion article by Xinhua, the official news agency, last month suggested that Lotte was an accomplice in an effort to undermine China and that it was no longer welcome in the country. An editorial in China Youth Daily last week urged a boycott.
For all the bombast in the news media, some have urged restraint, questioning the wisdom of efforts to drum up criticism of South Korea.
Zhang Mengjie, 29, who adores South Korean boy bands like BTS, said boycotts of South Korean goods and artists were irrational.
“These stars are just there for entertainment; they don’t want to engage in politics,” Ms. Zhang said. “They have nothing to do with it.”
Referring to the people who were protesting against Lotte, she added: “I don’t think this is real patriotism. They just go with the flow, act impulsively and use extreme rhetoric.”
For Chinese citizens with relatives and friends from South Korea, the backlash has created anxieties.
Dong Mengmeng, 24, a ski coach from the eastern province of Anhui, is planning to get married next month to her South Korean fiancé, Jung Jaeyoon, 27, in Gyeongju, South Korea. But she said that because of the tensions she had been unable to secure tourist visas for 11 Chinese relatives to attend the ceremony.
“I’ve been hijacked by patriotism,” she said.
Ms. Dong said that she was often in tears and that her mother was afraid to inquire about the status of her visa application because she was worried she would be harassed.
This year is the 25th anniversary of the establishment of formal ties between China and South Korea. But in a sign of the tensions between the two countries, there is no plan in place yet to celebrate the occasion.
Analysts said that the protests might be short-lived and that Chinese leaders probably did not want too much animosity with elections looming in South Korea.
“These initiatives would typically peter out quite quickly,” said Pal Nyiri, a professor at Vrije Universiteit Amsterdam who studies Chinese nationalism. “The government has been following the same policies — fostering nationalism and then using it, but also being wary of it getting out of hand.”
Many Chinese people are already finding it difficult to uphold a boycott, given the preponderance of popular Korean goods — makeup, face masks, kimchi — on the shelves of Chinese stores.
Zhang Xin, an electrician, stopped at a Lotte store in Beijing on his way home, and bought a bag of ribs to make lunch for his wife. He said he supported the boycott.
“South Korea is always blustering at China; they are arrogant,” Mr. Zhang, 49, said. “In the future, I will shop here less.”