On the other hand, Hong Kong’s importance to China has dwindled, but Beijing still needs it as a financial hub. Most foreign investment into China flows through the territory. Mainland Chinese companies also raise money through Hong Kong, where global investors have put $2.6 trillion in Chinese company stocks.

Beijing has warned that the protests threaten Hong Kong’s future prosperity. On Sunday, it said it approved a plan to further open up the economy of Shenzhen, a booming city just across the border from Hong Kong, suggesting that it wants to increase competition between the two cities.

For years, businesses in Hong Kong have been able to prosper by staying out of politics. But under China’s current leader, Xi Jinping, the Communist Party has amassed more power and intruded into more parts of Chinese life, including business. It has also taken an increased interest in Hong Kong affairs since protests in 2014, known as Occupy Central, that also challenged China’s policies toward the territory.

Mainland Chinese consumers and businesses, often egged on by state media that criticizes any foreign business that does not appear to show the country proper respect, have also emerged as forces in their own right. The result has been a near-daily campaign to prod companies like Versace, Coach and Givenchy to apologize to China for implying in their products and websites that Hong Kong was a separate country.

On Weibo, the Chinese social media platform, mainland Chinese internet users started a #BoycottCathayPacific hashtag, which was viewed half a million times. Analysts at the state-owned Industrial and Commercial Bank of China put a “strong sell” rating on the stock because of what it called “poor crisis management.”

On the other hand, companies risk going too far in placating China. When the actress Liu Yifei last week publicly supported the Hong Kong police, protesters called for a boycott of “Mulan,” the live-action Disney film set to be released next year in which she will play the title character.