Hundreds of protesters have set fire to furniture and documents inside a court in Alexandria where six senior police officers accused of killing activists in Egypt's 2011 uprising were standing trial.
The violence broke out after the criminal court judge overseeing the trial said he was transferring the case to the city's appeals court.
Lawyers for the plaintiffs requested that the court consider the report of a fact-finding committee before proceeding with the defendants' hearings.
Families of the deceased and their supporters watching the proceedings on court television in an adjacent hall erupted in anger and fought with police, who beat them back with batons, witnesses said.
"The people want to bring down the regime" and "the people want to cleanse the judiciary", the protesters chanted.
Violent clashes continued outside the courtroom after police drove them out.
Protesters hurled rocks at police and set two police cars on fire, witnesses said.
Police responded with tear gas and a police car was shown in video footage ramming into a protester.
Security forces detained some protesters and dozens of people were injured, state news agency Mena said.
Following the clashes, protesters raided the court and set fire to furniture and legal papers and documents inside, damaging part of the building.
The senior officers facing trial in Alexandria are accused of using excessive force that led to the deaths of protesters during the unrest that ousted president Hosni Mubarak.
Alexandria's former security director Mohammed Ibrahim is among the defendants. Mr Ibrahim has since retired, while the others are still working for the Interior Ministry.
Since Mubarak was deposed in February 2011 nearly 100 police officers have been brought to trial on charges of killing and wounding protesters. All were acquitted or received suspended sentences.
Rights groups have criticised what they say remains a culture of police impunity.
Mubarak and his former interior minister were sentenced to life in prison for failing to stop the killings. They were granted a retrial this month.
Around 900 protesters died in the revolt that began on January 25, 2011, with some 300 killed in Alexandria alone.
As the two-year anniversary of Egypt's uprising approaches, tensions are rising and further protests against new President Mohamed Morsi and his Islamist allies are expected.