The Muslim Brotherhood's Mohammed Morsi was declared Egypt's first democratically elected president amid tumultuous scenes in Cairo last night, as the Islamist movement cast off decades of persecution to take the most significant step of its long rise to power.
Tahrir Square erupted in an explosion of noise as it was announced that Mr Morsi had defeated Ahmed Shafiq, a retired general and Mubarak-era prime minister, and would become the first leader not to be a Pharaoh, Sultan or General in Egypt's history.
His victory came 16 months after the collapse of Hosni Mubarak's dictatorial regime and set the seal on a rise to power for the world's most important Islamist movement following years of its leaders being alternately feared, admired, jailed or killed.
But first it faces a struggle with Egypt's powerful military establishment, which retains sweeping powers after dissolving parliament, giving itself a constitutional veto and declaring effective martial law in the days of uncertainty that preceded yesterday's poll result.
It was unclear last night whether the two sides had negotiated any kind of power-sharing deal in return for the army accepting the Brotherhood's triumph.
Mr Morsi, an American-educated professor of engineering, was imprisoned under the long dictatorship of Mubarak, the former president, and was briefly detained at the start of the uprising last year.
Now he will have to work closely with the military remnants of his regime, including Field Marshal Mohammed Hussein Tantawi, the defence minister and head of the all- powerful Supreme Council of the Armed Forces (SCAF), in forging a way forward for a country on the brink of economic and social ruin.
The announcement of the result had been delayed from Thursday, amid accusations of manipulation and foul play, with both sides submitting hundreds of complaints alleging fraud.
Rumours swept Cairo that the result was going to be given to Mr Shafiq, Mr Morsi's rival even though most assessments gave the Islamist group a narrow lead of 900,000 votes.
The hundreds of thousands people who gathered in Tahrir Square and in other public spaces were forced to endure another tortuous wait as the chairman of the Presidential Election Commission held up the result for almost an hour.
But in the end, the figures he gave -- 13,230,131 votes for Mr Morsi against Mr Shafiq's 12,347,38 -- were close to the original projections.
As Tahrir Square erupted into cheering, flag-waving and honking of car horns, one Brotherhood supporter said the result showed that the people could have trust in the judiciary, even if not in the army.
Tolba Mohammed (42) an engineer, said: "We didn't expect the military could allow them to declare Morsi as winner. It doesn't restore my confidence in SCAF, but it does make me more confident in the judges."
The result does not end the uncertainty. After dissolving parliament, the army has seized legislative and budget powers. Mr Morsi will also have to defer to it on security, defence and foreign-policy issues. Mr Morsi will head the National Defence Council, but it will decide key issues by majority voting.
On the Square, some of those celebrating said they intended to stay until Mr Morsi had real rather than just symbolic power. "Morsi is president in name only," said Mohammed Moussa, (30) a translator. "There are more battles to come." ( © Daily Telegraph, London)