The Muslim Brotherhood's Mohammed Morsi has officially won Egypt's presidential election and will be the country's next president, the electoral commission has announced.
Morsi picked up 13.2 million votes out of just over 26 million, giving him about 51 per cent of the vote. His competitor, Ahmed Shafiq, the final prime minister under Hosni Mubarak, received 12.3 million. More than 800,000 ballots were invalidated.
Farouq Sultan, the head of the election commission, delivered a long speech before announcing the results in which he defended the body's "independence and integrity" amidst what he called meddling by unnamed political factions.
The two candidates filed 456 complaints about the electoral process, Sultan said, most of them allegations of either forgery or Christian voters being blocked from polling stations in Upper Egypt. The vast majority of those complaints were dismissed.
Political uncertainty ahead
Morsi's victory caps off more than a week of behind-the-scenes negotiations between the Brotherhood and the ruling Supreme Council of the Armed Forces (SCAF). He claimed victory just hours after last week's runoff election, based on unofficial numbers tallied by the Brotherhood, but the commission delayed its official announcement until Sunday.
In the intervening days, Khairat al-Shater, the Brotherhood's political boss, met generals from SCAF at least once. Sources say they were negotiating exactly what powers the president will have.
Despite Morsi's victory, many of those questions about his power remain unanswered.
Shortly before the polls closed last week, the generals issued a decree sharply limiting the powers of the new president. It permitted him to declare war, for example, only with the approval of the military council.
SCAF will also keep control of legislative power, and the budget, until a new parliament is elected. Egyptians went to the polls in November to elect a legislature, which was dominated by the Muslim Brotherhood's Freedom and Justice Party, but it was dissolved earlier this month after a high court ruling found parts of the electoral law unconstitutional.
Saad el-Katatni, the speaker of the now-dissolved parliament, also met with officials from SCAF, and told them that the Brotherhood would not accept the court ruling or the election-night decree. But it's unclear whether the Brotherhood ultimately accepted those decisions in exchange for the presidency.
Either way, the military council - which has promised to hand over power to a civilian government on June 30, in a "grand ceremony" - will remain a powerful force in Egyptian politics, despite the election of a civilian president.
Thousands of Brotherhood supporters burst into cheers on Cairo's Tahrir Square, waving national flags and chanting "Allahu Akbar!" or God is Great, greeting a dramatic victory.