Former Egyptian dictator Hosni Mubarak has been freed from custody, and all charges against him were dropped. On Saturday, a judge decided that the prosecution committed a procedural mistake that allowed for Mubarak's freedom. His release has sparked protests throughout the North African nation.

According to the Washington Post, Mubarak has been charged with ordering police to kill protesters during the Arab Spring protests that ended his 30-year rule almost four years ago. The judge said the prosecution took too long to file their indictment against the former air force officer.

Aside from dismissing those charges, the judge also dismissing corruption charges against Mubarak and his two sons. He also acquitted security aides also charged with the killing of protesters.

"I never did anything wrong, so I just waited for what the court would present, and I was declared innocent," Mubarak said on the Sada el-Balad channel via telephone after his release.

News of Mubarak's release sparked protests throughout Egypt. Protesters gathered on Tahir Square, the same place of the Arab Spring protests, to protest Mubarak's release. Demonstrators also gathered at Cairo University as well as Zagazig University on the Nile Delta.

Around 800 people died during the 18 days of protests that toppled Mubarak. The Guardian reports two people were killed and nine injured Saturday night. Police fired tear gas and birdshot at around 1,000 protesters who gathered at Tahir Square.

"The verdict [on Mubarak] further reinforces concerns about the alarmingly selective justice system in Egypt, which appears more intent on settling political scores and punishing dissent than establishing justice," the Egyptian Initiative for Personal Rights said in a statement.

Mubarak's supporters, however, celebrated his release, hailing it as a vindication of his rule.

According to the BBC, Mubarak and seven other officials, including former Interior Minister Habib al-Adly, were sentenced to life in prison for conspiracy to kill back in 2012. However, a retrial was ordered over a technicality.

Although Mubarak's fall ushered a time of democracy in Egypt, this soon ended last year when the military overthrew President Mohammed Morsi. General Abdel Fatah al-Sisi was then elected leader this year.