The "second revolution"
Wednesday's coup was the culmination of weeks of efforts by Morsy's opponents to push him out. They said 22 million people had signed petitions calling for him to step down -- more than had voted for him in the 2012 election -- and followed up with days of protests that attracted massive crowds.
Morsy's supporters countered with rallies in favor of his government. At times, bloody clashes ensued. Dozens were killed.
On Monday, the military issued a 48-hour ultimatum demanding that Morsy form a power-sharing government with his opponents. The end of Morsy's rule came on Wednesday, when his conciliatory gestures failed to placate the military. Opinion: How Egypt's military holds key to country's future
Egypt's experience with democratic governance was short for a country whose history can be measured in millennia. "Either we risk a civil war or ... take extra constitutional measures to ensure that we keep the country together," he said, explaining the military's conundrum. "This is a recall, and it is nothing novel."
But Morsy failed to fix the nation's ailing economy or stop spiraling crime, both of which worsened during his tenure. He was seen by many as increasingly autocratic.
Human Rights Watch has said he had perpetuated abusive practices that Mubarak had established, molding them to his own purposes and adding to them. These included the trial of civilians by military courts, the permitting of police brutality and the suppression of critical voices.
Adly Mansour, head of the country's Supreme Constitutional Court, was sworn in Thursday as interim president.
He dissolved Egypt's upper house of parliament, the Shura Council, and appointed a new head of intelligence, state TV said Friday.
The new government moved quickly to arrest leaders of the Muslim Brotherhood and was following up on hundreds more warrants. Some taken into custody have since been released, state television reported.
The Egyptian army has promised a path to new elections.
Wearing his trademark sunglasses, the 85-year-old Mubarak appeared Saturday in the fourth session of his retrial over his alleged involvement in the killing of protesters during his ouster. His appeal of last year's guilty verdict began in May, but was postponed on Saturday to August 17.
Egypt is pivotal
In Washington, a State Department spokeswoman on Friday condemned the violence following Morsy's ouster and called on the military to respect the will of the people, but did not call for Morsy's reinstatement.
"The voices of all who are protesting peacefully must be heard -- including those who welcomed the events of earlier this week and those who supported President Morsy," spokeswoman Jennifer Psaki said. "The Egyptian people must come together to resolve their differences peacefully, without recourse to violence or the use of force."
U.S. President Barack Obama was spending the weekend at Camp David; Secretary of State John Kerry was vacationing in Nantucket.
But U.S. Sen. John McCain, R-Arizona, called Friday for the suspension of U.S. aid to Egypt's military, which exceeds $1 billion per year. "We cannot repeat the same mistakes that we made at other times in our history by supporting the removal of freely elected governments," the ranking member of the Senate Committee on Armed Services told CNN affiliate KNXV. Once the military sets a timetable for elections and a new constitution, "then we should evaluate whether to continue the aid," he said.
Egypt is the most populous Arab country in the world and has long been a close ally of the United States, which supported it with military aid even during Mubarak's 30-year dictatorship.
It controls the Suez Canal, a crucial sea route through which more than 4% of the world's oil and 8% of its seaborne trade travel.
With Jordan, it is one of two Arab countries that have signed peace treaties with Israel.