At least 39 people were hurt on Friday after opposition activists marched on thousands of Islamists rallying outside the Supreme Court in central Cairo demanding judicial reform, an official said.
The fighting took place in Abdel Moneim Square and on the October 6 Bridge that passes over it after crossing the Nile River. Islamists on the bridge threw rocks at militants below, including masked members of the so-called Black Bloc.
An AFP correspondent said some of the Black Bloc members fired birdshot at people on the bridge, wounding two of them.
Opposition activists also set fire to an empty bus that had brought Islamists to the rally.
The head of the Egyptian emergency services, Mohammed Sultan, told television that at least 39 people had been hospitalised.
An hour after the clashes broke out, three armoured police vehicles arrived and began firing tear gas, the correspondent said.
The Islamists were demanding an overhaul of the judiciary, after a court challenged a decision by Islamist President Mohamed Morsi to sack the veteran state prosecutor.
"The people demand the cleaning up of the judiciary," the protesters chanted.
Morsi's Muslim Brotherhood had called the demonstration outside the Supreme Court, which has repeatedly challenged Morsi since he took office last June.
Last month, a court overturned a controversial decree by Morsi to sack state prosecutor Abdel Meguid Mahmud, appointed by ousted president Hosni Mubarak, and replace him with Talaat Abdallah.
The court believed Morsi had overstepped his powers when he sacked Mahmud, blamed for bungling the trials of former regime officials, including Mubarak himself, after the 2011 uprising.
Many judges are Mubarak-era appointees, and Morsi supporters claim they remain hostile to them despite subsequent election victories.
A court also overturned Morsi's calling of parliamentary polls for this month, ruling that he had ratified a new electoral law without consulting the constitutional court.
Morsi's presidency has been plagued by unrest and deadly clashes between protesters and police, a revolt in Suez Canal cities, sectarian violence and a devastating economic crisis, in what many fear is bringing Egypt to the brink of chaos.
Egypt is negotiating with the International Monetary Fund on multi-billion dollar loan to stabilise its finances, and the IMF said on Monday that talks had made progress.
The deal would require considerable reforms, and clinching it has been held up in part by the inability of the government to build a political consensus around the programme.