Extremist Islamist groups that gained considerable freedom to operate during Morsi's year in office have already vowed violence in retaliation.

The first major Islamic militant attack came before dawn Friday in the tumultuous Sinai Peninsula, killing at least one soldier. Masked assailants launched a coordinated attack with rockets, rocket-propelled grenades and anti-aircraft guns on the airport in the northern Sinai city of el-Arish, where military aircraft are located, as well as a security forces camp in Rafah on the border with Gaza and five other military and police posts, sparking nearly four hours of clashes.

One of military's top commanders, Gen. Ahmed Wasfi arrived at el-Arish on Friday to lead operations there as the army declared a "war on terrorism" in Sinai. A crowd of Morsi supporters tried to storm the governor's office in the city but were dispersed by security forces.

The night of Morsi's ouster, jihadi groups held a rally in el-Arish attended by hundreds, vowing to fight. "War council, war council," a speaker shouted, according to online video of the rally. "No peacefulness after today."

Islamic militants hold a powerful sway in the lawless and chaotic northern Sinai. They are heavily armed with weapons smuggled from Libya and have links with militants in the neighboring Gaza Strip, run by Hamas. After the attack, Egypt indefinitely closed its border crossing into Gaza, sending 200 Palestinians back into the territory, said Gen. Sami Metwali, director of Rafah passage.

At the Rabia al-Adawiya rally earlier in the day, the crowd filled much of a broad boulevard, vowing to remain in place until Morsi is restored. The protesters railed against what they called the return of the regime of autocrat Hosni Mubarak, ousted in early 2011.

"The old regime has come back ... worse than before," said Ismail Abdel-Mohsen, an 18-year old student among the crowds outside the Rabia al-Adawiya Mosque. He dismissed the new interim head of state sworn in a day earlier, senior judge Adly Mansour, as "the military puppet."

"After sunset, President Morsi will be back in the palace," they chanted. "The people want God's law. Islamic, Islamic, whether the army likes it or not."

Many held copies of the Quran in the air, and much of the crowd had the long beards of ultraconservative men or encompassing black robes and veils worn by women, leaving only the eyes visible. One protester shouted that the sheik of Al-Azhar — Egypt's top Muslim cleric who backed the military's move — was "an agent of the Christians" — reflecting a sentiment that the Christian minority was behind Morsi's ouster.

In southern Egypt, Islamists attacked the main church in the city of Qena on Friday. In the town of Dabaiya near the city of Luxor, a mob torched houses of Christians, sending dozens of Christians seeking shelter in a police station. Clashes broke out Friday in at least two cities in the Nile Delta between pro- and anti-Morsi demonstrators.

The first steps for creating a post-Morsi government were taken Thursday, when Mansour, the 67-year-old chief justice of the Supreme Constitutional Court, was sworn in by fellow judges as interim president. A Cabinet of technocrats is to be formed to run the country for an interim period until new elections can be held — though officials have not said how long that will be. In the meantime, the Islamist-written constitution has been suspended.

On Friday, Mansour dissolved the country's interim parliament — the upper house of the legislature, which was overwhelmingly dominated by Islamists and Morsi allies. The Shura Council, which normally does not legislate, held legislative powers under Morsi's presidency because the lower house had been dissolved.

Mansour also named the head of General Intelligence, Rafaat Shehata, as his security adviser.