CAIRO - The prospect of Ahmed Shafiq succeeding Hosni Mubarak as president of Egypt is a nightmare for revolutionaries and Islamists, but a security blanket for those wary of change. Shafiq, who served briefly as 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 Shafiq, a former air force commander, had come second to Mursi in the opening round of Egypt's first free presidential election this week. He said that with most votes counted, Mursi had won 25 percent, Shafiq 23 percent, a rival Islamist Abdel Moneim Abol Fotouh 20 percent and leftist Hamdeen Sabahy 19 percent. The two top candidates will contest a run-off on June 16 and 17. The bluff, straight-talking 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 favourite. 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 Mubarak on Feb. 11, 2011. It also rested on the fear, not least among Egypt's 10 percent Christian minority, of rising Islamist power. Less easy to determine is the extent to which Shafiq relied on the networks of 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 Mubarak, had sought to bar 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 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. 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 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," Shafiq told Reuters earlier this year, saying he could ensure a "smooth transition". The military council that took over from Mubarak haspromised 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," Shafiq, 70, declared.