The trouble broke out in Port Said yesterday after a court sentenced the men to die for their involvement in riots which killed 74 people, many of them visiting fans, after a football game in the city last February
Some 300 people were also hurt in yesterday's rioting.
Residents ran wildly through the streets enraged that men from their city had been blamed for the stadium disaster, and gunshots were reported near the prison where most of the defendants were being held.
The victims included two police officers who were shot dead outside Port Said's main prison when relatives of the detained men tried to storm the facility.
Others were killed when police fired teargas and rubber bullets at the crowd.
Armoured vehicles and military police fanned through the streets of Port Said after the violence.
One general was quoted by the state news agency as saying the military aimed to "establish calm and stability in Port Said and to protect public institutions".
Yesterday's violence followed a day of unrest on the second anniversary of the uprising that ousted President Hosni Mubarak.
At least nine people were killed in clashes with police on Friday, mainly in the port city of Suez, where the army has also deployed.
Hundreds more were injured as police rained down tear gas on protesters, who were armed with stones and petrol bombs.
Thousands also took to the streets of Cairo, Alexandria and other cities to protest against what they call the authoritarianism of President Mohamed Mursi's rule.
During the riots at the Port Said soccer stadium last year, many spectators were crushed and witnesses saw some thrown off balconies after the match between Cairo's Al Ahly and local team al-Masri.
Families of the victims cheered and wept in court when Judge Sobhy Abdel Maguid read a list of 21 names "referred to the Mufti" – a phrase used to denote execution as all death sentences must be reviewed by Egypt's top religious authority.
A total of 73 people have been standing trial. Other rulings will be issued on March 9, the judge said.
Meanwhile, Britain called for "maximum restraint" and strongly condemned the violence in Egypt following two days of clashes.
Foreign Office Minister Alistair Burt said such violence "can have no place in a truly democratic Egypt".
He added: "This cannot help the process of dialogue which we encourage as vital for Egypt today, and we must condemn the violence in the strongest terms."