CAIRO, Egypt (CNN) -- Egypt's military toppled the country's first democratically elected president Wednesday night and reportedly put him under house arrest while rounding up some of his top supporters even as the deposed Mohamed Morsy insisted that he remains the country's legitimate leader.
Hundreds of thousands of people took to the streets across Egypt over the military's actions that were decried by Morsy's supporters as a "coup" and celebrated as a "correction" by his opponents. At least eight people were killed and more than 340 wounded in sporadic violence that at times pitted Morsy's supporters against the opposition and the military.
Morsy "did not achieve the goals of the people" and failed to meet the generals' demands that he share power with his opposition, Egypt's top military officer, Gen. Abdel-Fatah El-Sisi, said in a televised speech to the nation.
Adly Mansour, head of the country's Supreme Constitutional Court, will replace Morsy as Egypt's interim president, El-Sisi said. Mansour was expected to be sworn in on Thursday.
The military has not publicly commented on Morsy's whereabouts. But Muslim Brotherhood spokesman Gehad El-Haddad told CNN the deposed president was under "house arrest" at the presidential Republican Guard headquarters in Cairo. He said some members of Morsy's inner circle have also put under house arrest.
The country's constitution has been suspended, and Mansour will "establish a government that is a strong and diverse," said El-Sisi, head of the country's armed forces. New parliamentary elections will be held, and Mansour will have the power to issue constitutional declarations in the meantime, he said.
El-Sisi said the military was fulfilling its "historic responsibility" to protect the country by ousting Morsy, a Western-educated Islamist elected a year ago.
Morsy remained defiant and insisted he was Egypt's proper president.
"The world is looking at us today," he said in a taped statement delivered to the Arabic satellite network Al Jazeera. "We by ourselves can bypass the obstacles. We, the sons of Egypt, the sons of this country -- this is the will of the people and cannot be canceled."
Shortly after Morsy's statement aired, Al Jazeera reported its Cairo studios were raided during a live broadcast on Wednesday and its presenter, guests and producers arrested. The Muslim Brotherhood, the long-repressed political movement that propelled Morsy to office, said its broadcast outlets had been shut down.
The state-run Middle East News Agency said the two top leaders of the Muslim Brotherhood's political party had been taken into custody, and another state-run outlet, the newspaper Al-Ahram, said another 300 were being sought by police.
El-Haddad told CNN that he has been told hundreds of names have been put on an "arrest list" but couldn't confirm any arrests beyond those of the Muslim Brotherhood's Freedom and Justice Party chief, Saad el-Katatni, and its deputy, Rashad Al-Bayoumi.
Morsy said he remains open to negotiations and dialogue, and he called on supporters to demonstrate peacefully. But at least eight people were killed and more than 340 wounded in clashes around the country on Wednesday, Health Minister Dr. Mohamed Mustafa Hamid told Al-Ahram.
Morsy opponents who packed Tahrir Square, now the epicenter of two Egyptian upheavals, erupted in jubilation and fireworks when El-Sisi made his announcement.
"This is a united people of Egypt," anti-Morsy organizer Ahmed el Hawary said. "Mohamed Morsy has actually succeeded in uniting the people, after two years that we were totally against each other ... Mohamed Morsy, with his bad management, with his risking all the lives of Egypt, brought all Egyptians back together to be facing again their future, hand in hand."
But Abdoul Mawgoud Dardery, a former member of parliament from the Morsy-allied Freedom and Justice Party, called that "ridiculous."
"I don't know how can anyone with common sense support a military coup in a democracy," he said. Egyptians "will never recognize a coup d'etat," he said.
And across the Nile River from Tahrir Square, Morsy supporters chanted chanted "Down with military rule" and "The square has a million martyrs."
Before Wednesday night's announcement, troops moved into key positions around the capital, closing off a bridge over the Nile and surrounding Rabaa Adawya Square, where Morsy's supporters were gathered.