Three years after Egyptians rose up to demand the overthrow of Mubarak, thousands of demonstrators in Cairo's Tahrir Square on Saturday chanted slogans backing another military man, General Abdel Fattah al-Sisi, as police clashed with Islamists and activists elsewhere.
Forty-nine people were killed, the ministry said, in 24 hours of fighting across Egypt as police and supporters of the military-installed government clashed with Islamist backers of president Mohamed Morsi, who was deposed in July after a single turbulent year in power.
Egypt was already on edge after four bombs exploded in Cairo on Friday, including a massive blast outside police headquarters. The attacks, which were claimed by a Sinai-based extremist group, killed six people.
Hours before Saturday's rallies, a small bomb outside a police training centre in north Cairo wounded one person, while another 16 were hurt when a car bomb exploded beside a police base in the canal city of Suez.
Ansar Beit al-Maqdis, an Al-Qaeda-inspired group, claimed Friday's bombings, all of which targeted police, and urged "Muslims" to stay away from police buildings.
Security forces across Cairo moved quickly to disperse scattered pro-Morsi protests while welcoming demonstrators to sanctioned commemorations.
In the Muhandiseen district, police fired tear gas and birdshot at anti-government protesters outside a mosque, scattering them into side streets.
Gunfire could be heard in the Alf Maskan neighbourhood, where some of Saturday's deadliest fighting took place, a witness said.
Of the 49 people killed, most died in Cairo and its suburbs, and others in Alexandria and Minya, the health ministry said on Sunday, adding 247 people were injured.
The interior ministry said 1,079 "rioters" were arrested.
One of the dead in Cairo was a member of the April 6 movement which spearheaded the uprising against Mubarak and had also opposed Morsi, a group member told AFP.
"The regime has substantial and now energised support, a majority of the politically active citizens of this country," said Michael Hanna, an expert on Egypt with The Century Foundation, a US-based think-tank.
"But there are still resilient sources of opposition that they are choosing to deal with violently."
Police, who have killed hundreds of Islamists in street clashes since Morsi's overthrow, have vowed to halt all such demonstrations.
But they encouraged Egyptians to turn out in support of the interim government, and some politicians called for rallies to back Sisi, whose popularity has skyrocketed among Egyptians craving stability.
The Islamist Anti-Coup Alliance which backs Morsi also urged its supporters to continue their "revolutionary movement" on Sunday in Cairo and other provinces.
Mubarak, who ruled for three decades, was forced to step down on February 11, 2011, after 18 days of demonstrations that left some 850 people dead.
The military took power until Morsi's election in June 2012, but then toppled him a year later after millions took to the streets demanding his resignation, accusing him of betraying the "revolution" that toppled Mubarak.
In Tahrir on Saturday, tanks guarded the entrances to the square as demonstrators waved Egyptian flags and carried posters of Sisi.
"The people demand the execution of the Brotherhood," demonstrators chanted, as several took their pictures with security forces and tanks.
Government and military officials have hinted the turnout at Saturday's pro-government rallies could be a bellwether for a run by Sisi in a presidential election promised for later this year.
Sisi is widely seen as a strongman who can restore order and fight militancy, which the interim government blames on Morsi's Muslim Brotherhood.
The Brotherhood, which renounced violence decades ago and won a series of elections following Mubarak's overthrow, condemned Friday's bomb blasts, as they have previous attacks on the police and army.
But after an attack on a police building in December, also claimed by Ansar Beit al-Maqdis, the authorities declared the Brotherhood a "terrorist organisation", making even expressions of verbal support punishable by heavy prison sentences.
Security forces have waged a bloody crackdown since Morsi's overthrow in which at least 1,000 people have been killed and thousands of Islamists arrested, including virtually all top leaders of the Brotherhood. Morsi has also been jailed.
Amnesty International said there has been "state violence on an unprecedented scale over the last seven months".