There were several shocks in store on Friday for Egypt's fledgling flock of political pundits. The first was that neither of the anointed frontrunners in the first round of the presidential elections was anything of the sort. Those two alone – Abdel Moneim Abul Fotouh, who broke with the Muslim Brotherhood to run as an independent, or Amr Moussa, a former Arab League chief – got the chance to debate each other on television, but neither got anywhere near the votes needed for the second-round runoff.

In their place was Mohammed Morsi, who had been consistently written off as the Muslim Brotherhood's second choice after the first preference, Khairat al-Shater, was disqualified from running. No poll in the three-week campaign gave Morsi a chance of getting over 8pc, but last night he was heading for a winning 25pc. A fierce battle was going on for second place between Mubarak regime relic Ahmed Shafiq, and leftwing Nasserite Hamdeen Sabahy. Shafiq's strong vote was the second shock for those in both secularist and Islamist camps who thought that the Tahrir Square revolution had seen off Mubarak's old guard. It clearly had not, because the former air force officer was on 24pc, a vote that caused his spokesman to claim prematurely Friday night that the revolution was now over.

The prospect of a runoff between a last-minute substitute from the Muslim Brotherhood and a hangover from the old regime was instantly dubbed the nightmare scenario. The argument goes that two candidates no one wants have been pushed to the fore by the only six-cylinder engines available in Egyptian politics, the Brotherhood and the army. Further, the runoff between the two could be polarising and potentially violent. This need not be. Morsi is a more experienced operator than he is often portrayed as being, and if he is less charismatic than al-Shater then so was Turkey's first Islamist president, Abdullah Gul, when compared to the more fiery, and quotable, Recep Tayyip Erdogan. Gul and Erdogan swapped places as indeed Morsi and al-Shater could one day do.

The wider point is that the pro-revolutionary vote, both Islamist and secularist, was heading Friday night for a clear majority. The strength of the vote of both Morsi and Shafiq blindsided Egypt's social media, but no surprise there. Whether the middle class in Cairo likes it or not, these figures suggest the Brotherhood could be the only axis of power capable of keeping the old regime out. The Brotherhood will have to learn that it cannot do this alone, and Morsi may well find himself offering key places to nationalists such as Sabahy. But this result is far from being apocalypse now for the revolution, even if it feels that way for a few weeks.

–Guardian editorial