Egyptian president-elect Mohamed Morsi is to become the first Islamist head of state in the Arab world's most populous nation after being declared winner in a divisive run-off with ex-premier Ahmed Shafiq.
Morsi, one of the leaders of the powerful Muslim Brotherhood, has pledged that Egypt under his leadership will be inclusive, and he courted secular and Christian voters.
A retiring individual, bearded and bespectacled, Morsi has vowed to uphold the goals of the revolution that ousted president Hosni Mubarak last year and to share power with other parties.
However, his victory appears to be symbolic after the military defanged the post by recently granting itself sweeping powers.
Morsi, who became the Brotherhood's candidate only after their first choice Khairat El-Shater was disqualified, beat Shafiq with 51.73 percent of the vote.
Many had written him off as an uncharismatic substitute, saying he would be unable to muster widespread support.
But the powerful Brotherhood mobilised its formidable resources and supporters behind Morsi, who was appointed last year to head its political arm, the Freedom and Justice Party.
Last week, Morsi reiterated his pledge of an inclusive presidential institution that "includes all forces, presidential candidates, women, Salafis and our Coptic brothers."
He pledged to end "discrimination against any Egyptian based on religion, ethnicity or gender."
Morsi had claimed victory hours after polling closed on June 17, based on stamped tallies of electoral officials at polling stations.
He long held that Egyptians would not vote for a symbol of the old regime.
"Egyptians will never bring back Mubarak through the window after they kicked him out of the door," he told reporters.
During his campaign, Morsi offered a fiery stump speech, pledging a presidency that would be based on Islam but would not be a theocracy.
Initially awkward, he appeared to gain confidence as his campaign proceeded, growing comfortable in his new role as a potential president as he gave interviews and made speeches.
Morsi was born in the Nile Delta province of Sharqiya and graduated with an engineering degree from Cairo University in 1975. He received a PhD from the University of Southern California, where he was an assistant professor, in 1982.
He was a member of an anti-Israel group, the Committee to Resist Zionism, but dedicated much of his time to the Muslim Brotherhood, which first fielded him in a parliamentary election in 2000.
In a 2005 election, which gave the Brotherhood one-fifth of the seats in parliament, he kept his seat. But he was soon arrested and jailed for seven months after participating in protests supporting reformist judges.
By the 2010 election, Mursi had become a spokesman for the Islamists and a member of their politburo.
He was jailed again on the morning of January 28, 2011, a day after the Brotherhood announced it would join the protests that would topple president Mubarak almost two weeks later.
Morsi, and other Brotherhood leaders arrested at the time, served only a few days before being sprung from jail during massive prison breaks across the country.
The Brotherhood believes in establishing an Islamic state gradually and through peaceful means, but Morsi's focus has been mostly on issues affecting the majority of Egyptians since the revolt, such as the deteriorating economy.
Morsi is married, with five children and three grandchildren.