Islamist Mohammed Morsi has been declared the winner in Egypt's first free presidential election in history, closing the tumultuous first phase of a democratic transition and opening a new struggle with the still-dominant military rulers who recently stripped the presidency of most of its powers.
In Tahrir Square, the birthplace of the uprising that ousted autocratic President Hosni Mubarak, joyous supporters of Mr Morsi's Muslim Brotherhood wept and kneeled on the ground in prayer when they heard the announcement on live television. They danced, set off fireworks and released doves in the air with Mr Morsi's picture attached in celebrations not seen in the square since Mubarak was forced out on February 11, 2011.
Many are looking now to see whether Mr Morsi will try to take on the military and wrestle back the powers they took from his office just one week ago. Thousands vowed to remain in Tahrir to demand that the ruling generals reverse their decision.
In his first televised speech, the 60-year old US-trained engineer called on Egyptians to unite and tried to reassure minority Christians, who mostly backed Mr Morsi's rival Ahmed Shafiq because they feared Islamic rule. He said he carries "a message of peace" to the world and pledged to preserve Egypt's international accords, a reference to the peace deal with Israel.
He also paid tribute to nearly 900 protesters killed in last year's uprising. "I wouldn't have been here between your hands as the first elected president without ... the blood, the tears, and sacrifices of the martyrs," he said.
In the lengthy and redundant speech, Mr Morsi appeared to be struggling to compose his sentences. Wearing a blue suit and tie, he looked stiff and uncomfortable and did not smile throughout as he read from a paper. He was non-confrontational and did not mention the last-minute power grab by the ruling military, instead praising the armed forces.
The White House congratulated Mr Morsi and urged him to advance national unity as he forms a new government. White House press secretary Jay Carney said Mr Morsi's victory is a milestone in Egypt's transition to democracy after decades of authoritarian rule under Mubarak. The Obama administration had expressed no public preference in the presidential race.
Left on the sidelines of the political drama are the liberal and secular youth groups that drove the uprising against Mubarak, left to wonder whether Egypt has taken a step towards becoming an Islamist state. Some grudgingly supported Mr Morsi in the face of Mr Shafiq, who was Mubarak's last prime minister, while others boycotted the vote.
Mr Morsi will now have to reassure them that he represents the whole country, not just Islamists, and will face enormous challenges after security and the economy badly deteriorated in the transition period.
The results of the elections were delayed for four days amid accusations of manipulation and foul play by both sides, raising political tensions in Egypt to a fever pitch.