The Chinese phrase qiu hou suan zhang is literally translated as “to balance the books after the autumn harvest”. But in common parlance it means “to take revenge when the time is ripe”. China’s leaders use the aphorism to discuss the problem of Hong Kong.

With peaceful and violent protests still escalating, and the police and government struggling to control the situation, Chinese officials have mostly struck a conciliatory tone until now. But even if the demonstrations fizzle out immediately and the former British colony returns to normality, Beijing will settle its scores and “Asia’s world city” will never be the same again.

The protesters, steeped in Chinese history, are well aware of this impending retribution. It has given their movement a hard, nihilistic edge. “If we burn, you burn with us,” reads one of the most common slogans spray-painted across the central business district. For its part, the ruling Communist party has learnt a powerful lesson from its response to the earlier, peaceful “umbrella movement” of 2014 and its aftermath.

Back then, thousands of young people occupied the city centre for 79 days to demand genuine universal suffrage as promised in the Basic Law, the territory’s mini constitution.

Not only did that movement fail in its objective, it prompted Beijing to tighten its grip over Hong Kong in a way that eroded the freedoms and rights that exist nowhere else in the People’s Republic of China.

Leaders of the umbrella movement were prosecuted, and then reprosecuted to impose harsher prison sentences, lawmakers with the wrong political views were expelled from the legislature, a pro-independence political party was banned, and a senior Financial Times editor was expelled from Hong Kong for hosting a discussion with the party’s founder.

Independent booksellers publishing political gossip were abducted and spirited across the border to face trumped up charges in Communist party-controlled courts. State-owned or state-controlled companies now own most of the bookshops and newspapers in the territory. Beijing also accelerated economic integration between Hong Kong and the mainland, hoping that material wealth would reduce dissatisfaction in the city. After all this, they still ended up with the worst outbreak of unrest on Chinese soil since the 1989 Tiananmen massacre.

The conclusion Beijing has drawn from the past four months of rage is the only one possible in an authoritarian — increasingly totalitarian — system: they were far too soft last time around. When the moment is right, they must act ruthlessly to punish Hong Kong.

Just as in China in the aftermath of 1989, Hong Kong’s education system will be overhauled to promote “patriotic” narratives; “unreliable” civil servants and judges will be purged; news outlets will be muzzled; all business figures, including multinational companies, will be expected to display loyalty to the motherland. The internet will probably be censored. Mass arrests are likely. This is a best-case scenario, predicated on the protests ending now — which is unlikely.

In Beijing, the discussion is instructive. Party cadres say there is nothing really wrong with the fish-tank that is Hong Kong, but what is needed is for all the “bad fish” to be replaced with “good fish”. The central government will try to retain the trappings of an international financial centre — open markets, a freely convertible currency, a relatively independent and professional judiciary for non-political cases — but will quickly strip away the rights and freedoms that make Hong Kong unique.

The calculus of Communist rule does not allow for concessions to unruly provinces. If President Xi Jinping were to compromise and grant Hong Kong the right to vote for its leaders then what about Shanghai or Shenzhen? If he does not harshly punish the territory then the rest of the nation and his many political enemies would smell weakness, rather than applaud his restraint.

Because the people of Hong Kong instinctively understand what is coming, they are unlikely to quietly return to their ordinary lives.

Neither side can back down. So the chances of People’s Liberation Army soldiers on the streets of Hong Kong are rising every day as the violence escalates. One senior police official says privately that as many as a quarter of his officers are joining peaceful protests in their spare time. Hated as it is right now, the Hong Kong police force is made up of Cantonese-speaking locals. Faced with a Mandarin-speaking occupying army from the north, many officers would choose to join the rebellion.

This scenario would rob Beijing of the luxury to choose when and how it punishes the city. But vengeance is coming.

jamil.anderlini@ft.com