Nobel Peace laureate Mohamed ElBaradei was chosen Saturday as premier to help lead Egypt out of a deepening crisis, official sources said, after bloodshed followed the ouster of the country's first freely elected president.
The Tamarod movement, which engineered mass protests culminating in the overthrow of Islamist president Mohamed Morsi on Wednesday, made the announcement after talks with Egypt's new caretaker leader.
"Interim president Adly Mansour has tasked Mohamed ElBaradei with forming a new government," the official MENA news agency reported later.
News of the appointment, which a military source confirmed to AFP, was greeted with cheers in Cairo's Tahrir Square and Ittihadiya presidential palace, where opponents of Morsi set off firecrackers, frantically waved Egyptian flags and honked car horns.
It came as the Muslim Brotherhood staged a new show of force to demand the military restore Morsi, after dozens of people died and hundreds more were injured in 24 hours of violence.
Tamarod, which has called for demonstrations on Sunday to counter the Islamists, had nominated ElBaradei to represent it in negotiations with the military.
ElBaradei, now 71, won the Nobel Peace Prize in 2005 for his work as the head of the International Atomic Energy Agency.
He returned to Egypt in 2010 and became a prominent opponent of veteran strongman Hosni Mubarak in the lead-up to the 2011 uprising that overthrew him.
Aya Hosni, a member of Tamarod's central committee, told AFP that "the interim president and Tamarod had agreed on Mohamed ElBaradei's nomination as prime minister".
The appointment came as an Islamist protest to demand the reinstatement of Morsi petered out at nightfall, following 24 hours of ferocious violence that killed 37 people and injured more than 1,400.
Tears flowed freely as thousands of Morsi supporters mourned four members of the movement killed during protests the Brotherhood called to reject the coup.
The imam told mourners gathered outside Cairo's Rabaa al-Adawiya mosque, where the Islamists have camped for the past 10 days, to pray for the "martyrs of legitimacy".
Wearing green headbands, Islamists in their thousands, including many fully veiled women, waved Egyptian flags and pictures of the deposed president.
Morsi, who has been in detention since overnight on Wednesday, had issued a defiant call for his supporters to protect his elected "legitimacy", in a recorded speech aired hours after his removal.
Saturday's funerals follow shooting between soldiers and Morsi supporters outside the Republican Guard headquarters on Friday that MENA said killed four demonstrators.
Meanwhile, influential Qatar-based Muslim cleric Yusuf al-Qaradawi, who was born in Egypt, issued a fatwa urging Egyptians to support Morsi.
Signup to our newsletter and follow us on Facebook and Twitter!
Friday's violence erupted despite talk of peaceful protests.
Residents of one Cairo district reported that bearded Islamists armed with machineguns, machetes and sticks clashed with them as they passed through their district overnight.
"The Brotherhood attacked the area with all kinds of weapons," said Mohammed Yehya, who said he lost three friends in the mayhem.
His claim could not be verified, but many other residents gave similar accounts.
In response, a spokesman for the Brotherhood's Freedom and Justice Party told AFP: "Not everyone with a beard belongs to the Muslim Brotherhood."
The bloodletting continued on Saturday with gunmen killing a Coptic Christian priest in the restive north of the Sinai peninsula, security souces said.
That came after armed Morsi supporters stormed the provincial headquarters in the Sinai town of El-Arish and raised the black banner of Al-Qaeda-inspired militants on Friday night, an AFP correspondent reported.
Morsi's single year of turbulent rule was marked by accusations he failed the 2011 revolution by concentrating power in Brotherhood hands and letting the economy nosedive.
The United States echoed UN chief Ban Ki-moon in calling for a peaceful end to the crisis.
"We call on all Egyptian leaders to condemn the use of force and to prevent further violence among their supporters," said the State Department.
But Republican Senator John McCain called for a suspension of US military aid to Cairo because Egypt's army had "overturned the vote of the people".
Egypt's armed forces chief, General Abdel Fattah al-Sisi, announced Morsi's overthrow on Wednesday night, citing his inability to end a deepening political crisis.
Morsi is being "preventively detained", a senior officer told AFP.
A judicial source said the prosecution would question Brotherhood members, including Morsi, for "insulting the judiciary".
Coincidentally, Mubarak appeared in court on Saturday when his retrial for alleged complicity in the killings of protesters in 2011 resumed.
The 85-year-old appeared in the dock behind bars, wearing dark sunglasses and a white prison uniform. His trial was adjourned until August 17.