University students from across Hong Kong began a week-long boycott of classes at the Chinese University of Hong Kong on Sept. 22. (EPA/Jerome Favre)

Tens of thousands of pro-democracy protesters are swarming the streets of Hong Kong. Beijing faces dire consequences. The Chinese authorities’ hands are tied: They will look weak if they make concessions, but the regime’s image and the city’s business interests are suffering while the protests continue. How did Beijing end up with such a difficult problem? Rather than a result of miscalculations, the confrontation was inevitable.

The protests in Hong Kong were triggered by the Chinese authorities’ unwillingness to make democratic concessions to the city. Beijing decreed that only its favored candidates could run in the city’s elections in 2017. This decision destroyed hopes of real democracy in the city. Even though Hong Kong residents will have universal suffrage, any candidate who runs will need to be pre-approved by a select committee of Beijing loyalists.

Why did China not make democratic concessions to avoid unrest? Chinese scholar Weiwei Zhang argues that the protesters in Hong Kong are the ones who need to compromise. He contends that Hong Kong is far less important to China than it was 30 years ago, given China’s economic rise. But in fact, as Hong Kong is on the cusp of democracy today, events in the city are very important to Beijing.

The fundamental problem the Chinese regime faces is that the Chinese mainland shares strong cultural and ethnic ties with Hong Kong. Research by Beth Simmons and her colleagues shows that policies and institutions often spread between countries with shared visible cultural markers. If Hong Kong can demonstrate how to make democracy work, it is easy to imagine that it could also work in China. This explains why the Chinese government is so reluctant to yield to the democratic demands of the citizens in Hong Kong.

In my own work I show that hostility and wars have historically been more likely to occur between countries that are culturally similar but differ in their political institutions. A dictator’s fear of political contagion is even more acute in the case of divided countries, which by definition are culturally very similar.

The two Koreas are one example. A North Korean dictator will fear the diffusion of democratic ideas from South Korea. While Pyongyang can have no hope of destroying South Korea, it can use low-level hostility and propaganda to make North Korean citizens more likely to look at South Korea as an enemy, not as a model.

How does a dictator paint another country which could serve as an attractive model for the dictator’s citizens as an enemy? In my research, I analyze North Korean propaganda before and after the democratization of South Korea in 1987. My quantitative text analysis shows that words that describe human suffering appear alongside “South Korea” much more frequently after 1987 than before. The newly democratic regime is alleged to be dictatorial: It “far surpasses its predecessor dictators in terms of its tyrannical nature.’’ Statements describing South Korea as a “living hell,’’ where “the toiling masses who account for an overwhelming majority live in poverty, sorrow and penury’’ become commonplace.

A quick look at how the Chinese media describes the protesters in Hong Kong reveals striking similarities. Public discussion about the Hong Kong protests is heavily censored. Chinese newspapers are beginning to discuss the protests but paint an undemocratic picture of the pro-democracy movement. In an article from the front page of the People’s Daily, China’s main newspaper, the protests are portrayed representing “a serious departure from democracy and the rule of law.’’ Another People’s Daily article strikes the same tone, and claims that instead of fighting for democracy, the protesters are stifling its development.

The official press also stresses the suffering of the Hong Kong citizens during the protests. “Extremists” behind the protests are said to be “disrupting normal order’’ and “disrupting economic conditions.’’ Another article claims that the protests are incited by a small number of extremists, and that their “illegal actions to undermine the rule of law’’ will further increase their “unpopularity.’’ By contrast, mainland stories depict the Chinese government is representing stability, and as a defender of rule of law and development in Hong Kong.

Did Xi Jinping miscalculate by not allowing free elections in Hong Kong? We cannot know whether the Chinese leadership expected protests of this magnitude, although a large pro-democracy demonstration prior to the controversial decision was a powerful warning. Beijing, in general, tries to avoid collective action by its citizens and is said to fear democratic contagion. In recent days pro-Hong Kong protesters in mainland China have been detained. The authorities in Beijing may believe they have no choice other than to deny free elections in Hong Kong: the dictator of a divided country risks too much by allowing a democracy to thrive beside him, providing citizens with a stark contrast to his oppressive regime.

Akos Lada is a doctoral candidate in political economy and government at Harvard University working on war between states with shared identities.