Thousands of rioters took to the streets in Egypt after a court upheld the death sentences of 21 people found guilty of causing Egypt's worst ever football violence in Port Said in February 2012.

In Cairo, protesters set fire to the football federation headquarters, while in Port Said, residents attacked the football stadium and attempted to block the Suez canal.

The court in Cairo also announced verdicts for the other 52 defendants in the case, with 24 of them sentenced to jail, including two senior police officers who received 15 years. The remaining 28 were acquitted, including seven police officers.

Police in Port Said retreated to their stations after weeks of clashes with supporters of the local football team, al-Masry. The army has been in charge of security in central Port Said after police were pulled back to ease tensions.

More than 50 people have died and hundreds more have been injured in the city during protests against the trial over the past month.

The sentences, broadcast live on television, were met with howls of protest from Port Said residents. Many felt their friends had been convicted for nothing.

Hundreds gathered outside the local government headquarters after the verdict, carrying flags calling for an independent republic of Port Said.

Residents said they felt scapegoated by both the verdict and the military curfew enforced in the city since violence erupted in January, when the death sentences were first announced.

In both Cairo and Port Said, many believe the February 2012 riots, in which 74 people were killed, were provoked by police. They began after al-Masry fans invaded the pitch and attacked rival al-Ahly supporters during a match between the two teams. Police stepped back from the trouble and turned off the stadium's electricity. In the darkness, fans were stabbed to death and crushed against locked doors.

On Friday, two protesters were buried in back-to-back funerals after allegedly being shot by police. Multiple reports from human rights activists and local campaigners accuse police of firing indiscriminately at Port Said residents over the past few weeks.

The government of President Mohamed Morsi is struggling to contain the unravelling security situation. Witnesses said youths untied moored speedboats which supply shipping on the Suez waterway, while about 2,000 people blocked car ferries from crossing the canal.

In January, similar riots broke out in Port Said after 21 other men involved in the riot were given death sentences. Forty people were killed in the violence, most of them shot by police.

Among those killed were Abdel-Halim al-Dizawi, who played for the city's Al-Marikh football team, and Tamer al-Fahla, who used to play for al-Masri.

At least eight people have been killed in Port Said this week, including three policemen.