An Egyptian court sentenced 230 people, including one of the leading activists behind the country's 2011 uprising, to life in prison after finding them guilty on Wednesday of taking part in clashes between protesters and security forces.

Judge Mohammed Nagi Shehata issued the ruling against the 230, including secular activist Ahmed Douma, who is already serving a three-year-sentence for breaking a draconian law regulating protests. He is also serving a three-year sentence issued by the same judge for contempt of court.

Wednesday's ruling can be appealed.

It is the heaviest sentence yet against the secular activists who spearheaded the mass protests four years ago that forced longtime autocratic President Hosni Mubarak to step down.

The case is connected to clashes in central Cairo in December 2011, during which a fire gutted parts of a library housing rare manuscripts and books.

Egypt's courts are swamped with the trials of thousands of protesters and government opponents following three years of turmoil, including a crackdown on dissent in the wake of the military overthrow of Islamist President Mohammed Morsi in 2013.

The judge, Shehata, gained international notoriety for sentencing three Al-Jazeera English journalists to prison after convicting them in June on charges linked to aiding the Muslim Brotherhood, which the government declared a terrorist organization following Morsi's ouster.

Earlier this week, Shehata sentenced 183 alleged Morsi supporters to death over the killing of 15 police in a grisly attack on a station in 2013, which unfolded as security forces violently cleared Cairo protest camps, killing hundreds of Islamist demonstrators.

Last year, Egypt's powerful lawyers union criticized Shehata for "disparaging" and "terrorizing" Douma's defense team after he referred five of the team's six lawyers to prosecutors for investigation.

Shehata accused them on various occasions of disrespecting him. The defense team has subsequently withdrawn from the case and the union backed their decision, instructing all members to boycott Shehata's court.