Muhammad Morsi of the Islamist Muslim Brotherhood has pledged to "be a president for all Egyptians" after that country's election commission declared him the winner of a presidential runoff.
The commission said on June 24 that Morsi won the presidential runoff with 51.7 percent of the vote against 48.3 percent for Ahmed Shafiq, the last prime minister under ousted leader Hosni Mubarak.
"I approach all of you on this day we are witnessing on which I have become, thanks to God and to your will, the president to all Egyptians," Morsi said. "And I will treat all Egyptians the same and respect them equally."
He also said that "the revolution continues, until all its demands are met," and he vowed that Egypt would honor all its existing international treaties.
"We will respect agreements and international law as well as Egyptian commitments and treaties with the rest of the world," Morsi said. "We will work to establish the principles of Egyptians and its civil identity as well as human values, especially freedom and the respect of human rights, the respect of women and family rights as well as children and to do away with any discrimination."
The June 16-17 vote -- Egypt's first free presidential election -- was seen to have sharply divided Egyptians, with some fearing a return to Mubarak-style military rule while others say the Muslim Brotherhood will bring an Islamist agenda to the presidency.
The election commission said turnout was 51.8 percent.
Morsi succeeds Mubarak, who was overthrown 16 months ago after a popular uprising.
There was no immediate reaction from Shafiq. He has said he would accept the commission's ruling.
A combo photo of Muhammad Morsi (left) and Ahmed Shafiq
International reaction was swift.
Israel said it "appreciates the democratic process in Egypt and respects its outcome." Prime Minister Benjamin Netanyahu's office also said that "Israel expects continued cooperation with the Egyptian administration on the basis of the peace accord between the two countries."
British Foreign Secretary William Hague congratulated Morsi on his win, calling it "an historic moment for Egypt" and called on the president-elect to "build bridges across Egyptian society and to uphold human rights."
Iran's Foreign Ministry congratulated Egyptians for the victory of the Islamist candidate and said the country was in the final stages of an "Islamic awakening."
Morsi, a 60-year-old engineer, has pledged to form an inclusive government.
The election result had been due on June 21 but the commission delayed the announcement in order to look into complaints by both candidates.
Tens of thousands of Muslim Brotherhood supporters had kept a vigil in Tahrir Square for days waiting for the results to be announced.
There was jubilation on Tahrir Square -- the focal point of the protests that brought down Mubarak last year -- when the election result was announced, with Morsi supporters waving flags, setting off fireworks, and beating drums.
Many Egyptians had rallied behind Morsi as a chance to finally rid the country of the old Mubarak regime. But secularist and liberals who support Morsi say he must rise above being just the Muslim Brotherhood's candidate to do so.
"He must create the feeling that he is the president for all Egyptians and not the president for a particular party or a specific group," said Dr. Mohamed Hassan, head of the Department of Material Engineering at Zagazig University, where Morsi teaches part-time. "And he has to prove this through the decisions that he takes, whether it is in the formation of the cabinet or in the appointment of the leadership figures in the country, whether that is the governors or any other positions."
Thousands of Morsi supporters celebrate his victory in Tahrir Square.
Others supported Shafiq as the best bet to counter Islamists and restore order after a year of protests, economic hardship, and fear about crime and continued instability.
There is little hope that the decision will lead to an end to 16 months of political turmoil, however.
A Morsi victory will likely see the new civilian government fight for its authority against a military that has ensured its powers persist past the transition.
The military has pledged to hand over power to civilian rule by July 1.
Egyptian state television said the head of the country's ruling military council, Field Marshal Hussein Tantawi, had congratulated Morsi.
In a series of recent moves, the military council greatly increased its legislative and executive powers, curtailing the powers of the president. The crowds in Tahrir Square have been chanting slogans against the moves.
Palestinians in the Gaza Strip erupted in celebrations, firing automatic weapons in the air on news that Morsi had won.
The Gaza Strip is ruled by the Islamic group Hamas, a local offshoot of the Muslim Brotherhood.
With reporting by AFP, Reuters, and AP