(CNN) -- An Egyptian judge sentenced 21 people to death Saturday for their roles in a football game riot last year, a ruling that sparked deadly clashes between security forces and relatives of the convicted.
The Port Said football incident left 74 people dead and 1,000 others injured.
Soon after the sentencing in the nation's worst stadium disaster, protests erupted outside the prison in the northeastern port city. Clashes outside Port Said prison left at least 20 civilians and two soldiers dead and dozens injured, a hospital official told state TV.
The armed forces sent troops to secure public buildings and restore calm in Port Said, according to state media.
The fatal clashes started after some relatives attempted to storm the building to free their loved ones, Brig. Gen. Osama Ismail, a spokesman for the Interior Ministry, told state-run Nile TV.
Crowds outside the prison fired guns and hurled rocks at the security forces, who in turn used tear gas to disperse the crowd, Ismail said.
"There is a state of anger on the streets of Port Said, and the security forces are on high alert," Nile TV reported.
The sentences were handed down in a packed courtroom in Cairo as victims' relatives and those convicted wept.
"I thank God that justice is back in the courts of Egypt. Many mothers will sleep sound tonight knowing justice is served," the mother of Mustafa Issam, who was killed in the riots, told Nile TV by phone.
The sentences must be reviewed by Egypt's highest religious authority, who will return his opinion to the court March 9. On that day, an additional 54 defendants in the case will also be sentenced, the judge said.
Dubbed the "massacre at Port Said" by Egyptian media, the riot broke out on February 1, 2012, after Port Said-based Al-Masry defeated Cairo's Al-Ahly, 3-1.
When the clashes began, about 22,000 people were inside the stadium, which can hold up to 25,000 people. About 2,000 Al-Ahly fans were at the game, authorities said.
Fans from both sides bashed each other with rocks and chairs. Many of those who died fell from the bleachers during the melee inside the stadium, while others suffocated.
It was unclear whether intense sports rivalries or political strife sparked the riots, though witnesses said tension was building through the game with Port Said fans throwing bottles and rocks at players on the Cairo team.
During Egypt's revolution that ended with the toppling of Hosni Mubarak, football fans became a powerful force for political change, according to CNN contributor James Montague, who wrote the book "When Friday Comes: Football in the War Zone."
Even so, the riots occurred at a time when Egypt was struggling with a security vacuum following Mubarak's ouster.
In the hours after the riot in Port Said, protesters in Cairo chanted, "Down with military rule." At the time, the secretary-general of the Muslim Brotherhood party blamed Egypt's military for the deaths.
Egypt's interior ministry blamed fans for provoking police. Witnesses said police did little to try to quell the clashes.