CAIRO – Angry relatives and residents rampaged through an Egyptian port city Saturday in rioting that killed at least 27 people after a judge sentenced nearly two dozen soccer fans to death for involvement in deadly violence after a game last year.

The unrest followed a bout of politically motivated violence that has left a total of 38 people dead in two days, including 11 killed in clashes between police and protesters marking Friday’s second anniversary of the uprising that overthrew longtime leader Hosni Mubarak.

President Mohammed Morsi canceled a scheduled trip to Ethiopia on Saturday and instead met for the first time with top generals as part of the newly formed National Defense Council.

The violence in Port Said erupted after a judge sentenced 21 people to death in connection with the Feb. 1 soccer melee that killed 74 fans of the Cairo-based Al-Ahly team. Executions in Egypt are usually carried out by hanging. All the defendants — who were not present in the courtroom Saturday for security reasons — can appeal the verdict.

Judge Sobhi Abdel-Maguid did not give his reasoning when he read out the verdicts for 21 out of the 73 defendants Saturday. The verdict for the remaining 52 defendants, including nine security officials, is scheduled to be delivered March 9. Some have been charged with murder and others with assisting the attackers.

Saturday’s violence quickly morphed into the larger disconnect between moderate and conservative Egyptians.

Die-hard soccer fans from both teams hold the police at least partially responsible for February’s violence, which was the world’s worst soccer violence in 15 years, saying officers at the game did nothing to stop the bloodshed. They also criticize Morsi for doing little to reform the police force or the judiciary since he took office in July.

The opposition says Morsi, Egypt’s first freely elected and civilian president, and his Muslim Brotherhood allies in government have failed to restore stability amid continued political turmoil and crime, and point to a worsening economy.

In a statement Saturday, the main opposition National Salvation Front said it holds Morsi responsible for “the excessive use of force by the security forces against protesters.”

They also threatened to boycott upcoming parliamentary elections if Morsi does not meet their demands that include amending articles in the new constitution.

The Brotherhood said in its statement that “misleading” media outlets were to blame for “enflaming the people’s hatred for the current regime and urging them to act violently.”

Immediately after Saturday’s verdict was read live on state TV, two policemen were shot dead outside Port Said’s main prison when angry relatives tried to storm the facility to free the defendants.

In other parts of the city, residents tried to storm the governor’s office, police stations, the power station and the main court building.