Security forces lobbed teargas and some fired automatic weapons in the air to try to prevent demonstrators opposed to the government reaching Tahrir Square, the symbolic heart of the 2011 uprising that toppled the former air force commander.
As police tried to calm Cairo's politically-charged streets, a car bomb exploded near a police camp in the Egyptian city of Suez, security sources said.
The blast, which was followed by a fierce exchange of gunfire, suggested the authorities could be locked in a long-term battle with Islamist insurgents who are gaining momentum.
But the growing violence has not dented the popularity of General Abdel Fattah al-Sisi, whose ouster of Islamist Mohamed Mursi, Egypt's first freely-elected president, plunged the country into turmoil.
Instead of commemorating Mubarak's overthrow, tens of thousand of Egyptians gathered in Tahrir to pledge their support for Sisi in an event stage-managed by the state.
An army marching band played, while vendors sold t-shirts with the general's image for five Egyptian pounds.
Huge banners and posters displayed Sisi in his trademark dark sunglasses at Saturday's rally. Some women kissed posters.
The core demands of the 2011 revolt - freedom and social justice - could only be heard in protests outside Tahrir, which were quickly muzzled by security forces.
The Sisi mania underscored the prevailing desire for a decisive military man Egyptians can count on to stabilise Egypt.
But an end to street violence seemed nowhere in sight. State television quoted a health ministry official as saying 29 people were killed in clashes during protests in Cairo and elsewhere.
Not far from Tahrir, police in black uniforms clutching assault rifles fired tear gas canisters in a clampdown on anti-government protesters lasting for about two hours.
Armoured personnel carriers were deployed to try and keep order, and anyone entering Tahrir had to pass through metal detectors.
The pressure prompted one alliance of liberals to call on their members to withdraw from the streets.
But others gathered in central Cairo after nightfall to call for an end to the army-backed government. "Down with military rule," they chanted.
Sisi toppled Mursi of the Muslim Brotherhood in July after mass protests against what critics called his mismanagement and increasingly arbitrary rule, triggering a confrontation with the veteran Islamist movement that has hit investment hard.
The general, who served as head of military intelligence under Mubarak, is expected to announce his candidacy for the presidency soon and is likely to win by a landslide in elections, expected within six months.
Several leading politicians have indicated they would not run for president if Sisi does, highlighting his dominance and the barren political landscape that has emerged since Mubarak's fall. The most vocal critics of the new order - the Brotherhood - have been largely driven underground.
The army congratulated Egyptians on the anniversary of the 2011 uprising and said it would help people build on the gains of what it calls the June 30 Revolution, a reference to the street unrest that prompted the army to oust Mursi.
Such messages have wide appeal for people like Shadia Mohamed Ahmed, a veiled middle-aged woman holding a poster of Sisi in Tahrir. She said "criminals" who commit violent acts against Egypt should be "executed in a public square."
The crowd around her called for the execution of Brotherhood members.
Tensions have been smouldering anew since a wave of deadly bombings killed six people in Cairo on Friday. An al Qaeda-inspired group, based in the lawless Sinai Peninsula, claimed responsibility, according to the SITE monitoring organisation.
In an audio message posted on militant websites, al Qaeda leader Ayman al-Zawahri called on Egyptian Muslims to focus on fighting what he called "an Americanised coup" staged by Sisi instead of battling the country's minority Christians.
The leader of the Coptic Christian church backed Sisi's military takeover.
Early on Saturday a bomb exploded near a Cairo police academy. No one was hurt, said the Interior Ministry.
Some didn't have the chance to express their views. Police fired live rounds in the air to disperse about 1,000 anti-government protesters in Cairo's Mohandiseen district and at two other marches in downtown.
Hisham Sadiq, a university student, said he was protesting against "military rule and the thugs of the Interior Ministry".
At one rally, the crowd yelled "the people want the downfall of the regime!" - a common chant during the 18-day revolt that ousted Mubarak - before running from tear gas.
Dozens of anti-government protesters were arrested in Egypt's second city Alexandria, security sources said.
When he removed Mursi, Sisi promised a political roadmap that would lead to free and fair elections.
But the Muslim Brotherhood says Sisi and his allies in the government have blood on their hands and accuse them of undermining democratic gains made since Mubarak's downfall.
Security forces have killed up to 1,000 Muslim Brotherhood supporters and put the movement's top leaders in jail. The Brotherhood, which renounced violence in the 1970s, has been declared a terrorist group.
But the tough measures have failed to pacify Egypt, which is of great strategic importance because of its peace treaty with Israel and control over the Suez Canal.
Sinai-based Islamist militants have stepped up attacks against security forces since Sisi toppled Mursi. Hundreds have been killed.
The security crackdown has been extended to secular-minded liberals, including ones who played a key role in the 2011 uprising. Human rights groups have accused the Egyptian authorities of quashing dissent and using excessive force, calling state violence since Mursi's ouster unprecedented.
Egypt's most prominent rights groups criticised the government for using the "purported aim of 'countering terrorism' as justification to commit arbitrary arrests and restrict freedoms."
Although the Brotherhood has been nearly crushed by the state, the group has a history of rebounding.
"Their soft, non-ideological support from Egyptian society has collapsed but their most energized core remains more zealous than ever," said Michael Hanna of the Century Foundation in New York.
"The Brotherhood and its supporters are not something that can be swept aside easily they have a substantial and resilient core."