CAIRO (AFP) - The Egyptian army toppled Islamist President Mohamed Mursi on Wednesday after a week of bloodshed that killed nearly 50 people as millions took to the streets to demand an end to his turbulent single year of rule.
The announcement, made on state television by Mr Mursi's own defence minister, armed forces chief General Abdel Fattah al-Sisi, drew a rapturous welcome from thousands of protesters who have camped out on the streets of Cairo for days.
Gen Sisi laid out details of the roadmap for a political transition, saying the Islamist-drafted constitution would be frozen and presidential elections held early, without specifying when.
The armed forces would "remain far away from politics," he stressed. The din rang out immediately, and continued for hours, as tens of thousands of people took to the streets of the capital to celebrate, cheering, whistling, letting off firecrackers and honking car horns in joyous scenes.
"It's a new historical moment. We get rid of Mursi and the Muslim Brotherhood," said one celebrator, Omar Sherif.
In an amateur video posted online, Mr Mursi declared "I am the elected president of Egypt" and urged people to "defend this legitimacy".
But the opposition Congress Party of former Arab League chief Amr Mussa said "this is not a coup".
"The 2,000-year-old Coptic Church, the 1,000-year-old Azhar mosque, the liberals, the Salafists (conservative Islamists), the police, the army are all behind the call for early elections," said a Congress spokesman.
Mr Mursi, Egypt's first freely elected president, came under massive pressure in the run-up to Sunday's anniversary of his maiden year in office, with his opponents accusing him of failing the 2011 revolution by concentrating power in the hands of his Muslim Brotherhood.
The embattled 61-year-old proposed a "consensus government" as a way out of the country's worst crisis since the 2011 uprising ended three decades of authoritarian rule by Hosni Mubarak.
But the United States urged Mr Mursi to "do more" as a military deadline passed for him to meet the demands of the people following a week of bloody unrest during mass protests calling for him to quit.
The advice came too late as the army announced that the head of the Supreme Constitutional Court, Adly al-Mansour, a previously little known judge, would become the new leader of the Arab world's most populous country.
Opposition leader Mohamed ElBaradei, former head of the UN nuclear watchdog, and the heads of the Coptic Church and Al-Azhar, Sunni Islam's highest seat of learning, sat alongside the armed forces chief as he announced Mr Mursi's overthrow on state television.
Adly Mansour, "the head of the Supreme Constitutional Court will take the oath before the court's general assembly," he said without providing a date.
"Early presidential elections will be held and the head of the Supreme Constitutional Court will manage the affairs of the state during the transitional phase until the new presidential elections."
The choreography was designed to show broad civilian support for the military's move to topple Mr Mursi, which dashed the hopes of supporters who had seen his elevation to the presidency after years underground as one of the key achievements of the 2011 revolution.
Mr Mursi's camp had earlier denounced the army's intervention as a coup.
"For the sake of Egypt and for historical accuracy, let's call what is happening by its real name: military coup," Essam al-Haddad, Mr Mursi's national security adviser, said in a statement on Facebook.
As tension mounted and crowds poured onto the streets to demand Mr Mursi's resignation, Mr Haddad said: "As I write these lines I am fully aware that these may be the last lines I get to post on this page."
Egyptian security forces later pulled the plug on a Muslim Brotherhood television channel, a Morsi aide told AFP.
Staff of Al-Jazeera's Egypt affiliate were also arrested after the channel aired a defiant speech by the deposed president, the aide added.
Dozens of armoured personnel carriers headed towards Islamist gatherings at Cairo University, Heliopolis and Nasr City where one official said they had encircled the pro-Morsi demonstrators to prevent chaos.
But in Cairo's Tahrir Square, the security forces looked on as tens of thousands of anti-Morsi protesters rallied in a demonstration that dwarfed that of the embattled president's supporters in Nasr City, on the opposite side of town.
"Come here O Sisi, Mursi isn't my president," the flag-waving protesters chanted in the square, referring to the army chief.
The crowd swelled at nightfall, after a scorching day that saw police officers hand out water to the demonstrators in the middle of Tahrir, epicentre of the 2011 uprising.
The powerful military had issued a 48-hour deadline on Monday for Mr Mursi to meet the "people's demands", a day after millions of protesters took to the streets calling for him to resign.
Washington confirmed that it had ordered out all of its embassy staff just hours after Mr Mursi's overthrow. Most Western embassies had remained closed since before Sunday's mass protests.