Vast crowds partied in Cairo's Tahrir Square, recalling the Arab Spring revolution two years ago when the army toppled the autocrat Hosni Mubarak. But in clashes after dark across the country, at least 14 people were killed and over 340 wounded.
The fall of the first elected leader to emerge from the Arab Spring revolutions of 2011 raised questions about the future of political Islam, which had seemed triumphant. Deeply divided, Egypt's 84 million people find themselves again a focus of concern in a region traumatised by the civil war in Syria.
Straddling the Suez Canal and a key piece in the security of Israel, many powers have an interest in Egypt's stability.
The army put combat troops and tanks on streets around a gathering of thousands of Mursi's supporters in Cairo. It said it would keep order across the country.
Within a couple of hours of the broadcast by military chief General Abdel Fattah al-Sisi, suspending the constitution and appointing the constitutional court's chief justice as interim head of state, three TV channels went off air. The Egyptian arm of Qatar's Al Jazeera was raided but kept transmitting.
The head of the political wing of Mursi's Muslim Brotherhood - the speaker of a disbanded parliament - was arrested at his home. State newspaper Al-Ahram said warrants were issued for 300 Brotherhood members accused of inciting unrest.
United Nations Secretary-General Ban Ki-moon urged a swift return to civilian rule, restraint and respect for civil rights.