Guide to Egyptian presidential election
On 16 and 17 June, Egyptians go to the polls in a run-off election to decide who will be their first freely-elected president. Thirteen candidates contested the first round on 23 and 24 May, with none winning more than half of the votes in order to guarantee victory.
This surprised no-one. The real surprise lay in the candidates who made it through to the second round. Mohammed Mursi, the last-minute choice of the Muslim Brotherhood Islamist movement, was a realistic contender for the run-off, but few observers had expected Ahmed Shafiq, the last prime minister of disgraced former president Hosni Mubarak, to reach the final round.
A second surprise came on 14 June, when the Constitutional Court ruled that the election of one third of the MPs last year was unconstitutional and called for the lower house of parliament to be dissolved.
This has a direct impact on the presidential election, as the incoming president has to wait until a new parliament is elected and chooses the constitution that will define his powers. This will now take even longer than expected.
This may persuade more Egyptians to turn out and vote in the presidential election on both sides, given that the Muslim Brotherhood majority in parliament is no longer a given.
Amr Moussa, a former foreign minister and ex-head of the Arab League, had a higher profile and more credibility with the supporters of the revolution that ousted Mr Mubarak, and was widely expected to reach the run-off.
Mr Mursi won 5.7 million votes, and Mr Shafiq was only 200,000 votes behind him. The third-placed candidate, the prominent left-wing lawyer Hamdin Sabbahi, polled 4.8 million votes. He immediately complained that the governing Supreme Council of the Armed Forces had rigged Mr Shafiq's impressive showing by inflating the army vote.
The Higher Presidential Election Commission has the final say in the probity of the vote, and it has ruled that first round was fair. This leaves the non-Brotherhood, anti-Mubarak opposition with three unpalatable options.
They can campaign, as some like Mr Sabbahi are doing, for the Armed Forces Council to step aside in favour of a presidential council representing all anti-Mubarak forces, but have no hope of success. They can then try to choose between the two candidates. Or else they can abstain - with or without street protests.
Brotherhood in decline?
Mr Shafiq's success so far can be explained by a number of factors. He appears to have convinced large numbers of Coptic Christians and undecided voters that he can prevent the prospect of an Islamist president ruling in tandem with the Muslim Brotherhood-dominated parliament. Moreover, as a former military man, Mr Shafiq appeals to voters appalled by the spike in crime that followed the fall of Mr Mubarak.
Mr Mursi topped the poll, but has considerable grounds for concern. In the parliamentary election in January the Muslim Brotherhood won more than 11 million votes. This has halved in the intervening months, and Mr Shafiq won in a number of provinces hitherto considered to be Brotherhood strongholds.
The Muslim Brotherhood's prevarications about whether to field a presidential candidate at all, its efforts to dominate the parliamentary committee charged with drafting the new constitution, and disappointment with its parliamentary performance overall have harmed its standing, as several senior Brotherhood figures have acknowledged.
Now that it looks like parliament faces new elections, there is a distinct possibility that the Muslim Brotherhood will lose its large majority.
In terms of drafting the new constitution, this means they would have less opportunity to strengthen a President Mursi and less power to hinder a President Shafiq. Either way, their position is weakened.
President without constitution
Unusually, the new president is being elected without a constitution defining his powers. The process of writing a new constitution for post-Mubarak Egypt has faltered over differences between parties. The Supreme Council of the Armed Forces insisted that the constitution must be drafted before the new president takes office on 30 June, but this is now impossible.
All political parties appear to agree, however, that the president's powers should be curtailed to prevent a new Mubarak-like strongman from emerging.
The election is being held under the rules introduced several months after the revolution, mainly easing eligibility criteria which were passed under Mr Mubarak and seemingly favoured himself and his son, Gamal, then seen as the likely successor.
The term of office was reduced to four years, and a two-term limit was introduced.
They were allowed to spend no more than 10m Egyptian pounds (approximately US $1.6m) on campaigning in the first round, and up to 2m Egyptian pounds in the second round. Foreign funding is strictly forbidden.
The next president faces the possibility of being elected on a very low turnout. Only 46.42% of eligible voters went to the polls in the first round of the presidential election, and an even lower figure in the run-off would seriously challenge the president's authority to govern.
Whoever wins the race will have to deal with daunting internal and external challenges, apart from the question of when his constitutional powers will be decided by the next parliament.
Internally, the new president will have to tackle difficult political, social, economic, and security problems.
Since Mubarak's removal, Egypt has been gripped by a polarised political situation where the Islamists are locked in a sharp tug-of-war with liberal and secular parties. The new president will also face the task of restoring security, which has deteriorated since the revolution, mainly because of the collapse of policing.
The economic situation also poses one of the biggest challenges. More than 40% of Egyptians live below the poverty line, political uncertainty has led to the collapse of foreign investment, closure of factories, an increase in unemployment and the erosion of foreign reserves.
Externally, the new leader will have to maintain friendly strategic relations with both the West and Arab countries.
Relations with Israel are also a big issue, as are the issues of Egypt's share of water from the Nile Basin and Egypt's ties with African nations.
BBC Monitoringselects and translates news from radio, television, press, news agencies and the internet from 150 countries in more than 70 languages. It is based in Caversham, UK, and has several bureaux abroad. For more reports from BBC Monitoring, click here