CAIRO, Egypt - 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 mobilized 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, Morsi 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 5 children and 3 grandchildren.
Who is Ahmed Shafia?
Morsi won against ex-premier Ahmed Shafia, a retired general and Mubarak-era figure reviled by activists who spearheaded the 2011 revolt.
Shafiq gained support as a candidate in the country's first post-revolt presidential election thanks to a strong law-and-order campaign in a country where many crave stability.
In the tense run-up to the final results, both candidates had claimed victory.
Before the June 16-17 presidential run-off, the former air force chief accused the powerful Muslim Brotherhood of violence during last year's uprising and of arson attacks against his campaign headquarters.
He said a victory for the Islamists would bring Egypt "back to the dark ages," but said he was ready to appoint an Islamist vice president.
In the delayed results of the run-off that were finally announced on Sunday, Morsi won 51.73 percent of the vote. Shafiq was runner-up in the first round last month with 23.6 percent, against Morsi's 24.7 percent.
Shafiq was almost disqualified from the presidential race after the adoption of a law prohibiting senior members of the Hosni Mubarak era from running, but the decision was reversed at the last minute.
Pollsters say Shafiq, who was forced to resign a month after Mubarak's ouster by massive street rallies, won sympathy, particularly among female voters, after his wife died in April.
With a reputation as a good technocrat, Shafiq, 70, was appointed prime minister during Mubarak's last days in power in a bid to appease the popular revolt that eventually overthrew the strongman on February 11, 2011.
But Shafiq was criticised for his association with the old regime and for having retained many Mubarak ministers in his cabinet, a decision that would force him to resign under pressure from youth movements that led the uprising.
Like Mubarak, Shafiq was a pilot who graduated from the Military Aviation Academy and touts his many military successes. His campaign boasted that he shot down two Israeli aircraft in wars with the Jewish state.
He was also eager to highlight his civilian achievements, saying he modernized the national carrier Egypt Air and Cairo's international airport.
In a country where all presidents since the fall of the monarchy in 1952 have had military backgrounds, Shafiq said he was "proud and honored" to be a "son of the armed forces."
Shafiq boasted of his "experience" and insisted he was open to criticism, but in several television interviews he showed a strict and impatient side.
To those who accused him of being a "felool" -- a pejorative term used by Egyptians to describe members of the old regime -- he said that he was only "one of the (people) chosen for vital positions."
"Who said I was not opposing the Mubarak regime?" he said, claiming to have objected to many decisions taken by the former regime and insisting he was more useful to his country by working for reform from the inside.
Shafiq made security and the fight against crime his top priority. - Agence France-Presse