Cairo (CNN) -- Ousted Egyptian leader Hosni Mubarak was sentenced to life in prison Saturday after he was convicted of ordering troops to open fire on demonstrators, a verdict that saw angry protesters disrupt the proceedings.
Punches were thrown as victims' family members protested the verdict inside the court. Others stood on chairs, raising fists in the air and chanting the sentence was not enough.
Mubarak and the judge were removed from the courtroom amid the melee.
The sentence handed down by Judge Ahmed Refaat was the final chapter of Mubarak's three decade, iron rule of Egypt that was brought to an end in February 2011.
The last days of Hosni Mubarak's regime
Egypt one year after uprising
Could Mubarak be sentenced to death?
Before a packed courtroom, Refaat praised the revolution and said it offered people relief after living "in 30 years of dark without any hope."
About 840 people died and more than 6,000 others were wounded in the uprising, according to Amnesty International.
Refaat chose the lesser of two sentences. Mubarak could have received the death penalty.
Former Interior Minister Habib El Adly was also convicted of ordering security forces to kill protesters and sentenced to life in prison. El Adly was convicted in May of corruption and money laundering, and sentenced to 12 years in prison.
But Refaat cleared Mubarak's sons -- Gamal and Alaa -- and a handful of Mubarak's aides.
Mubarak and his sons arrived Saturday morning at the Cairo Police Academy, where the trial was held, under tight security. Police in riot gear lined up behind a barricade separating them from demonstrators.
Hundreds outside the court chanted: "Execution is the only solution" and "he who kills must die."
Families of those killed during the protests carried posters emblazoned with photos of the dead while dozens of Mubarak supporters chanted ''innocent.