The head of the constitutional court has been sworn in as Egypt's interim president, a day after the overthrow of the country's first democratically elected leader, Mohamed Morsi.
Adli Mansour took his oath of office under an army transition plan in a ceremony that was broadcast live on state television.
As the ceremony got underway, the skies above Cairo filled with military jets in a series of fly-pasts.
Above Tahrir Square, for days the centre of anti-government protests, Air Force planes painted the sky in the colours of the national flag.
"I swear to preserve the system of the republic, and respect the constitution and law, and guard the people's interests," Mr Mansour said.
He praised the mass protests demanding the ouster of Mr Morsi, saying they united Egyptians, but also invited the deposed president's Muslim Brotherhood "to take part in the political life".
However, hours later the Brotherhood's supreme leader was arrested, news reports said.
The ousted president is in custody
The ceremony came after the army removed Mr Morsi, replacing him with Mr Mansour, suspended the Islamist-drafted constitution, and called for new elections.
Mr Morsi, who was elected a year ago, and his Brotherhood allies have blasted the army's intervention as a "full coup" by the generals.
The group, which renounced violence decades ago, vowed not to take up arms, according to a senior leader of the group, Mohamed El-Beltagy.
Anti-Morsi protesters react to the army statement
But he warned that the overthrow might push other groups toward violent resistance.
The "second revolution" - after Arab Spring uprisings that led to the overthrow of Hosni Mubarak in 2011 - leaves Egypt's 84 million people deeply divided.
In the streets of Cairo, millions celebrated the news of Mr Morsi's removal, as fireworks lit up the sky over Tahrir Square. At a square near Cairo University, his supporters were stunned into initial silence at the news.
Mr Morsi's removal prompted clashes across Egypt that left at least 14 people dead and hundreds wounded.
Fearing a violent reaction by Mr Morsi's Islamist supporters, troops and armoured vehicles deployed in the streets of Cairo and elsewhere, surrounding rallies.
General Abdul Fatah Khalil al Sisi announces the overthrow of Mohamed Morsi
David Cameron called for a return to the democratic process.
"We never support in countries the intervention by the military but what now needs to happen … is for democracy to flourish and for a genuine democratic transition to take place," the Prime Minister said.
"All parties need to be involved in that, and that's what Britain and our allies will be saying very clearly to the Egyptians."
Mr Morsi was being detained by the armed forces at an undisclosed facility, and prosecutors sought the arrest of the Muslim Brotherhood's top leaders and some 300 of its members.
In a televised address, the commander of the armed forces, General Abdul Fatah Khalil al Sisi, said Mr Morsi had "failed to meet the demands of the Egyptian people".
Flanked by military officials, Muslim and Christian clerics and political figures, he unveiled details of a political transition which he said had been agreed with them.
As acting leader, Mr Mansour will be assisted by an interim council and a technocratic government until new presidential and parliamentary elections are held.
No details were given as to when the new polls would take place.
Muslim Brotherhood members and pro-Morsi supporters react in Cairo
The military chief also announced a national reconciliation committee that would include youth movements, and said the armed forces and police would deal "decisively" with any violence.
"Those in the meeting have agreed on a road map for the future that includes initial steps to achieve the building of a strong Egyptian society that is cohesive and does not exclude anyone and ends the state of tension and division," he said.
UN Secretary-General Ban Ki-moon appealed for a peaceful settlement of the crisis, saying he will personally deliver a message to the country's leaders later in the day.
Ban said the "voices and aspirations of the people should have been heard" and that it was important to restore the democratic process in a "very volatile" situation.
President Barack Obama voiced his concern over the military intervention and urged a speedy return to a democratically elected government.
A military helicopter above Tahrir Square
In a statement he said: "We are deeply concerned by the decision of the Egyptian Armed Forces to remove President Morsi and suspend the Egyptian constitution.
"I now call on the Egyptian military to move quickly and responsibly to return full authority back to a democratically elected civilian government as soon as possible through an inclusive and transparent process, and to avoid any arbitrary arrests of President Morsi and his supporters."
However, the US and other world powers have not branded Mr Morsi's removal as a military coup - which might trigger sanctions.
British Foreign Secretary William Hague said he had talked with his Egyptian counterpart and had been reassured that "there will be early presidential elections".
He said: "It is the problem with a military intervention that it is a precedent for the future, that if this is going to happen to a democratically elected president it can happen to another in the future, and that's why it's so important to entrench democratic institutions."
A soldier cheers with anti-Morsi protesters
The Foreign Office has advised British citizens to avoid all non-essential travel to Egypt apart from the Red Sea resorts, and to monitor travel advice from the Foreign Office.
EU foreign policy chief Catherine Ashton condemned the bloodshed and also called for a swift return to democracy.
Mr Morsi's overthrow came after days of demonstrations against the government. He rejected calls to step down and defied an army deadline.
Sky's Middle East Correspondent Sam Kiley said that, a day after Mr Morsi's ouster, the atmosphere among Brotherhood supporters is "extremely subdued", with many going underground.
"One person, asking to remain anonymous, says that he feels that for them the regime has gone back to the days of Hosni Mubarak, when they were a banned organisation and their leadership was in jail."
The Muslim Brotherhood's TV station was taken off air and its managers arrested hours after Mr Morsi was overthrown.
The Egypt25 channel had been broadcasting live coverage of rallies by tens of thousands of pro-Morsi demonstrators in Cairo and around the country, with speeches by leading Brotherhood politicians denouncing the military intervention to oust the elected president.
The offices of Al Jazeera's Egyptian television channel were also reportedly raided by security forces and prevented from broadcasting from a pro-Morsi rally. Several members of staff were also reportedly detained.
:: Follow live updates here