Updated

An Egyptian activist who led protests over an iconic torture victim during the rule of Hosni Mubarak was sentenced on Tuesday to two years in prison for allegedly slapping a prosecutor.

The activist, Hassan Mostafa, denied the charge, and his lawyer called the case a malicious prosecution. Activists rallied outside the court Tuesday demanding his release.

The prosecutor accused Mostafa of slapping him during an argument over the whereabouts of protesters arrested during a January rally in the Mediterranean city of Alexandria. Mostafa's lawyer, Hamdy Khalaf, said Tuesday he was present during the argument and that the slap never took place.

Mostafa, 31, was a lead organizer of protests over the case of Khaled Said, a young man tortured to death by police in 2010. The death became a rallying cry for protesters that in part led to the uprising that toppled Mubarak in February 2011.

The same prosecutor investigated Mostafa during the 2010 anti-torture protests, leading to Mostafa being sentenced to a month in prison for fighting with a policeman, Khalaf told The Associated Press.

Mohammed Salem, Mostafa's brother, said the slapping case was brought because his brother has been a "headache" for authorities with his activism.