Egyptian prominent activist Alaa Abdel Fattah has been sentenced to five years in prison on charges of violating the controversial protest law in the country.

The blogger and government critic has been re-tried on charges of "blocking roads", "assembling illegally", "protesting without a permit" and other charges in relation to a rally held in November 2013 by the No to Military Trials for Civilians group in front of the Shura Council, Egypt's upper house.

Along with other 24 people, Fattah was demanding that the constitutional drafting committee removes the provision granting the military expanded and special powers such as the right to try civilians in secret military courts.

Ahmed Abdel Rahman, another defendant on trial with him, also received a five-year sentence. The others charged received three-year sentences, according to AP.

After the sentencing, the courtroom erupted into chants against the military-backed government of Abdel Fattah el-Sisi:

One of Egypt's most prominent secular activists since the early 2000s, Fattah, 32, was first detained in 2006 under the regime of Hosni Mubarak for a rally in favour of an independent judiciary. After being held for six weeks without charges, he was freed.

Fattah, who is a software developer and blogger, comes from a family of social activism. His father Ahmed Seif el-Islam, a leading human rights lawyer, was jailed and tortured in the 1980s for his activism. According to Amnesty International, Seif el-Islam worked on the "most important human rights-related cases in the country". He died aged 63 at the end of August.

The activist's sister, Mona Saif, has launched a movement against military trials for civilians.

After the Egypt's uprising broke out, Fattah took part in several demonstrations on the Cairo streets. In October 2011, he was arrested on charges of inciting violence against the military during the Maspero protests, in which hundreds of people were injured and 27 died. Fattah was released after two months in jail.

Before the Shura Council protest took place, the military-backed government approved a law forbidding any gatherings of more than 10 people without police permission.

Fattah, who has 611,000 followers on Twitter, was arrested and charged with organising an illegal protests. He was beaten upon his arrest at his house.