The uprising in Egypt must have stunned Chinese leaders. Beijing has heavily censored news of the uprising, strongly indicating that the Chinese Communist party (CCP), which narrowly avoided collapse during a similar popular revolt in 1989, is gripped by the fear that it could encounter the same fate as befell Hosni Mubarak.

The insecurity displayed by China’s ruling elites may seem extreme. After all, unlike the Mubarak regime, the CCP has consistently delivered increasing standards of living and currently faces few threats to its authority at home. The conventional wisdom says China has a self-confident leadership that sees itself as a contender for global supremacy.

But look a little deeper and this ostensibly resilient regime is afflicted by many of the same pathologies as Egypt: repression, corruption, low accountability, a surprisingly narrow base of support and fast-rising inequality. Yes, growth and prosperity help the CCP maintain its legitimacy. But the regime knows that performance-based legitimacy is unreliable, at best. The same frustrations that drove Egyptians into the streets could be unleashed in China when its economy inevitably hits a speed bump.

With mounting developmental challenges, China’s continued economic prosperity is by no means guaranteed, while rising food price inflation is a particular cause of concern for the regime. For the CCP, meeting such challenges requires not only technocratic policy solutions but also ought to include political reforms that will open up participation, make the CCP more accountable, and create a new basis of legitimacy.

That said, it is likely that the CCP will conclude that Mr Mubarak’s regime should have practised even harsher repression, and nipped the revolt in the bud. Chinese leaders probably also blame western influence and conspiracy, as they did when the colour revolutions toppled unpopular regimes in Ukraine, Georgia and Kyrgyzstan a few years ago.

China’s leadership may also attribute Mr Mubarak’s fall to his mediocre economic record – particularly his failure to create jobs for college graduates. Rising unemployment of college graduates is a problem China shares with Egypt.

It is far from clear, however, that these are right lessons for Beijing to draw. Starting long-delayed democratic reforms from a position of relative political strength could actually be in the CCP’s self-interest. The peaceful and smooth democratic transitions in Taiwan, Mexico and Brazil show that authoritarian regimes that initiate political opening could fare better than those that do not.

Even so, the CCP is more likely to continue to rely on the survival strategy it has adopted when its solders crushed the Tiananmen pro-democracy movement in June 1989. But the sustainability of this strategy seems increasingly in doubt. In China today social frustrations rise almost as fast as economic growth.

If the Egyptian crisis teaches us anything, it is that the legitimacy of autocrats vanishes quickly when circumstances change, and such regimes’ flaws are laid bare. The durability of the CCP’s rule, rather than just China’s economic trajectory, should now again be a hot topic of speculation.

Such a conversation is certainly one Chinese leaders, long accustomed to basking in the international glow of their economic miracle, would prefer not to have. They may have no choice. Like financial contagion, the political contagion that originated in Tunisia and spread to Egypt has refocused the attention of the international community on the underlying political frailties of autocratic regimes. The more such regimes get scrutinised, the less attractive they look.

Here China’s recent history provides an apt lesson. Without Deng Xiaoping’s economic reforms, the CCP would certainly have not survived the devastation of the Cultural Revolution. But Deng’s reforms can take a fundamentally flawed political regime only so far. The more difficult of gradual democratisation still lies ahead. The unfolding Egyptian revolution of 2011 should remind Beijing that it is high time to confront this task.