Inevitably, anyone following the demonstrations in Cairo's Tahrir Square would be reminded of similar protests in Tiananmen Square more than two decades ago, but the outcome could not have been more different. This is because the Egyptian military refused to attack the demonstrators and, in the end, forced the resignation of the president.
In China, of course, the so-called People's Liberation Army actually attacked the people with tanks and put down a peaceful protest by unarmed students and other civilians who were calling for democracy and an end to corruption.
It is far too early to say that, in Egypt, the forces of democracy have triumphed. The military is now in charge and, while it seems sympathetic to the demonstrators, militaries by and large tend to be conservative and put great stock in stability and order.
The events in Egypt have been hailed by world leaders. UN Secretary General Ban Ki-moon called the departure of Hosni Mubarak a 'historic moment' and said the resignation was 'in the wider interest of the Egyptian people'. US President Barack Obama noted that 'the people of Egypt have spoken, their voices have been heard'.
In China, however, there were no congratulations offered to the demonstrators, at least for the time being. Indeed, no Chinese leader has said anything about the fall of Mubarak. Only the Foreign Ministry's spokesman has provided an official view.
Before Mubarak's resignation, every Chinese statement emphasised support for 'Egypt's efforts to maintain social stability and restore normal order', which means the use of force, if necessary, to suppress demonstrators. After his resignation, China's emphasis has been on the restoration of order.
In fact, China would no doubt have preferred Mubarak to remain in power. Just as democracies do not fight each other, authoritarian governments identify with one another and the fall of one is seen as a warning to all.
The fall of Mubarak was preceded by the resignation and flight of the Tunisian president, which was brought about by a street vendor in a small town whose self-immolation triggered uprisings across the country, after the news was spread on the internet. Other neighbouring countries, such as Algeria and Yemen, have also been affected. This is a demonstration of the power of new technology, especially social networks such as Facebook and Twitter.
Officials in Beijing have closely followed these developments. The Chinese media were forbidden from publishing independent reports and told only to use dispatches from the official Xinhua news agency, which reported international reaction to these epochal events. Aside from Ban and Obama, leaders who offered positive comments included the secretary general of the Arab League, European Union leaders and those of Germany, Canada and Brazil. Even the Russian Duma, the lower house of parliament, welcomed Mubarak's resignation, calling the decision 'absolutely right'.
Xinhua, however, had nothing to say about China's reaction.
The day before Mubarak's resignation, it reported that 'the position of the army forces is now crucial. The army forces, which have been keeping good relations with the people in history, said they would not use force against the protesters.'
Xinhua's reporters no doubt remember that in 1989, when Tiananmen Square was packed with hundreds of thousands of protesters, the Chinese army had no such scruples and obeyed orders from the Communist Party to send tanks against the protesters, thus ending weeks of protests in the square.
China will no doubt draw lessons from the events in Egypt, especially the collapse of the ruling National Democratic Party and the failure of the Egyptian army to disperse demonstrators.
Beijing will strengthen party discipline as well as tighten the party's control of the military so as to ensure that, if there is another confrontation between the people and the regime, it will be the people who will be forced to 'resign', not the regime.
Frank Ching is a Hong Kong-based writer and commentator. Follow him on Twitter: @FrankChing1