Egypt's military has ousted Muhammad Morsi after days of protests against the country's Islamist president brought millions out on the streets.
General Abdel Fattah al-Sisi said the head of the country's Supreme Constitutional Court would serve as interim leader until a fresh presidential election.
Speaking on national TV, Sisi said Morsi had "failed to meet the demands of the Egyptian people."
Sisi, the country's top military commander, announced the country's constitution, criticized as being pushed through by Islamist lawmakers, will be suspended.
There was no immediate word of when the new election will be held.
Sisi was flanked by political and religious leaders as well as top generals when making the announcement.
Hours later, reports said Morsi had been detained, although details were sketchy.
Earlier on his official Facebook page, Morsi said the measures announced amounted to "a full military coup" and were "totally rejected." He called on supporters not to respond to the 'coup.'
Meanwhile, the TV station of Morsi's Muslim Brotherhood went off the air after Sisi's announcement.
The military has troops deployed across Cairo. The announcement by Sisi was met by cheers by the thousands of protesters rallying in Cairo's central Tahrir Square.
A 'Popular' Coup
Speaking to RFE/RL, Mirette Mabrouk, the deputy director for regional programs at the Atlantic Council's Rafik Hariri Center for the Middle East, called the military action a "coup," but with public support.
"I think we would have to say, yes, it is a military coup, but it's a military coup that took place with overwhelming public support and in my considered opinion it is a coup that never, ever would have been attempted or even considered if the army had not realized that there was overwhelming public support for this," Mabrouk said.
"I think the army wanted to be on the right side."
Sisi's announcement came hours after an ultimatum issued by Sisi expired. Sisi had given Morsi and his opponents 48 hours to find a compromise.
Hours before the deadline expired, Morsi said a coalition government could be part of a solution to overcome the political crisis. But opposition parties refused to meet with him.
Large demonstrations erupted across Egypt on June 30, exactly one year from the day when Morsi took power as Egypt's first democratically elected president.
However, analysts say many in Egypt became disillusioned with his rule, blaming him for giving too much power to his Muslim Brotherhood and failing to solve the country's social and economic problems.
Sisi met earlier on July 3 with the main liberal opposition leader, Muhammad ElBaradei; the grand sheikh of Cairo's Al-Azhar institution, a leading authority in the Muslim world; and Pope Tawadros, the head of Egypt's Coptic Christians.
Earlier on July 3, the military moved to tighten its control on key institutions, putting officers in the newsroom of state TV and reportedly surrounding the state television building with troops.
It also deployed armored vehicles near Cairo demonstrations by Morsi supporters.
Morsi had vowed not to step down in the face of millions of protesters over the last three days.
His Islamist supporters had vowed to resist what they call a "military coup." Essam al-Haddad, Morsi's national security adviser, warned earlier on July 3 that "no military coup can succeed...without considerable bloodshed."
Opponents of Morsi filled Cairo's central Tahrir Square ahead of the military's move.
"Anything is expected, we can't really predict what might happen," one protester there told reporters.
"But it could turn into a civil war if [Muslim Brotherhood leaders] insist on staying in power. And if they resort to violence, this violence will be met with violence, so it could definitely be a civil war."
Earlier on July 3, the Interior Ministry warned it would respond firmly to any violence.
Clashes left at least 23 dead on July 2 in Cairo, bringing the death toll to 39 since the protests started on June 30.
With reporting by AP, Reuters, and AFP