Mohammed Mursi took the oath before the Supreme Constitutional Court
Continue reading the main story
Friend or foe?
Price of power
What challenges will Mursi face?
Mohammed Mursi has been sworn in as Egypt's first civilian, democratically elected president at a historic ceremony in Cairo.
Mr Mursi, the Muslim Brotherhood's candidate, took the oath before the supreme constitutional court.
He promised to respect the constitution and the rule of law, and to protect the people of Egypt.
Later, in a speech to Cairo University, he promised to restore the parliament dissolved last week.
Mr Mursi's administration may now try to ease the military out, knowing that in overt confrontation, the military is the one with the guns, says regional analyst Magdi Abdelhadi.
But the regime of former President Hosni Mubarak is still largely intact and many in it will not work with the new president, he says.'Full freedom'
Parliament was dissolved by the Supreme Council of the Armed Forces (Scaf), which assumed legislative powers under a controversial "interim constitutional declaration".
The Scaf is due to hand over power to Mr Mursi later on Saturday.
Aged 60, married with four children
Comes from a village in the Nile Delta province of Sharqiya
US-educated engineering professor; teaches at Zagazig University
Rose through the ranks of the Muslim Brotherhood
Has been praised for his oratory as an MP
After toppling of Hosni Mubarak, he became chairman of Brotherhood's FJP party
The challenges facing Mursi
Profile: Mohammed Mursi
"The army now returns to his original role, protecting the nation and its borders," Mr Mursi said.
Parliament, the new president insisted, had been elected in a free and fair ballot and had been entrusted with drafting a new, democratic constitution.
In the ceremony before the court, Mr Mursi said the Egyptian people had "laid the foundations for a new life, for full freedom, a genuine democracy, for putting the meaning and significance of the constitution and stability above everything else".
He said his government would be based on the democratic pillars of "the constitutional court, the Egyptian judiciary, and the executive and legislative powers".
Mr Mursi's oath of office had originally been scheduled to take place at the parliament, which is dominated by the Muslim Brotherhood-backed Freedom and Justice Party and other Islamists.
Mr Mursi said he was determined that the constitutional court, which had declared November's parliamentary election to be flawed, would remain "independent, strong, effective - away from any suspicion and abuse".
Unlike during the Mubarak days, Cairo traffic was not stopped for Saturday's ceremony - underlining Mr Mursi's wish to be seen as one of the people, says the BBC's Jon Leyne in the city.
Handling relations with the Scaf is likely to be a key test for Mr Mursi as he begins his term of office.
Continue reading the main story
Interim constitutional declaration
Issued by ruling Scaf
Amends constitutional declaration of March 2011
Grants Scaf powers to initiate legislation, control budget, appoint panel to draft new constitution
Postpones new parliamentary elections until new constitution is approved
Q&A: Egypt's new constitutional declaration
The Scaf had previously said it would hand over power to Mr Mursi by the end of the month.
However, one of its members, Maj Gen Mohamed al-Assar, told Egyptian media that the head of Scaf, Field Marshal Hussein Tantawi, would remain as defence minister under Mr Mursi.
Also on Friday, Mr Mursi performed prayers at Cairo's al-Azhar mosque, one of the most prominent seats of learning in Sunni Islam.
He has sought to allay fears among some secular and Coptic Christian Egyptians that he will use his presidency to impose Islamic law.
Mr Mursi's campaign has said he plans to appoint a woman and a Coptic Christian as his vice-presidents.
Are you in Egypt? What are your thoughts about the future of the country as Mohammed Mursi is sworn in? You can send us your views using the form below.