Former air force commander Ahmed Shafiq, who served briefly as Hosni Mubarak’s last premier, is a divisive military figure who will contest next month’s run-off vote for the presidency against the Muslim Brotherhood’s Mohamed Mursi, according to a count by the Islamist group.

A Brotherhood official said Mr Shafiq, a former air force commander, had come second to Mr Mursi in the opening round of Egypt’s first free presidential election this week.

He said that, with most votes counted, Mr Mursi had won 25 per cent, Mr Shafiq 23 per cent, a rival Islamist Abdel Moneim Abol Fotouh 20 per cent and leftist Hamdeen Sabahy 19 per cent. The two top candidates will contest a run-off on June 16 and 17.

The bluff, straight-talking Mr Shafiq came from behind in a race in which Amr Moussa, former head of the Arab League, and ex-Brotherhood member Aboul Fotouh were early favourites.

His late surge reflected the anxiety of many Egyptians about a breakdown of law and order and the often violent political disputes that have punctuated an army-led transition since a popular revolt ousted Mr Mubarak on February 11, 2011.

It also rested on the fear, not least among Egypt’s 10 per cent Christian minority, of rising Islamist power.

Less easy to determine is the extent to which Mr Shafiq relied on the networks of Mr Mubarak’s now-banned National Democratic Party or on the influence of the military from which he sprang.

Parliament, dominated by the Muslim Brotherhood and other Islamists repressed under Mr Mubarak, had sought to bar Mr Shafiq from the race with a law disqualifying senior officials of the old administration.

But the election committee, headed by a former military officer, conditionally upheld Mr Shafiq’s appeal.

Many Shafiq supporters come not from the political hotbed of Cairo and other cities, but from the countryside, where voter concerns about security and order tend to be strongest.

His staunchest opponents are already threatening to take to the streets in protest if he becomes president.

Mr Shafiq, who favours open-necked shirts under the blazers or sweaters he wears in public, has vowed to uphold Egypt’s 1979 peace treaty with Israel, saying: “I object to Israel’s current actions, but I am a man who honours past agreements.”

He says he has the military and political experience to lead Egypt into a new democratic era, yet his links to Mr Mubarak have polarised voters.

He sees himself as slotting into Egypt’s 60-year-old tradition of drawing presidents from the military.

“You cannot suddenly bring a civilian man with no relation or knowledge of military life and make him president and supreme commander of the armed forces,” Mr Shafiq told Reuters earlier this year, saying he could ensure a “smooth transition”.

The military council that took over from Mr Mubarak has promised to hand over to a new president by July, but the army is expected to wield political influence for years to come.

“Civilians may be in a hurry and they think that as soon as the new president is elected he will act freely of the military. No, this will not be the case,” Mr Shafiq, 70, declared.

But the idea of Mr Shafiq taking power enrages many Egyptians who see him as a tool of the army and the Mubarak old guard who would roll back all the uprising’s fragile gains.

Protesters threw stones and shoes at him when he voted in Cairo on Wednesday. “The coward is here. The criminal is here!” they chanted. “Down with military rule!” Mr Shafiq was unhurt.

He makes no secret of his “good relations” with army chief Field Marshal Mohamed Hussein Tantawi, saying he had consulted him before deciding whether to run.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.