Cairo: A leading Egyptian activist behind the 2011 uprising that toppled Hosni Mubarak was released from prison on Thursday after serving a three-year sentence for violating a ban on unauthorised protests.

Ahmad Maher, who returned to his Cairo home, will remain under surveillance for three years as part of his sentence, his lawyer, Tarek Al Awadi, told The Associated Press. He will not be allowed to leave the country.

Maher, 36, was the co-founder of the April 6 movement, which used social media to bring protesters into the streets in Arab Spring-inspired demonstrations that forced Mubarak to resign in February 2011. Two and half years later, the military overthrew an elected but divisive Islamist president and the new government banned all unauthorised demonstrations.

Maher was arrested in November 2013, and the following month he was convicted along with April 6 co-founders Mohammad Adel and Ahmad Douma. Each was fined and sentenced to three years in prison. Adel will finish his sentence within a month while Douma is serving a life sentence in another case and is awaiting an appeal trial in April.

The government has waged a wide-scale crackdown on dissent over the past three years, jailing thousands of people. Most of those imprisoned are Islamist supporters of President Mohammad Mursi, who was overthrown and jailed in 2013, but the crackdown has also swept up prominent secular activists like Maher, Adel and Douma.

It’s unclear whether Maher will be able to return to activism in the current climate.

Al Awadi said the local police station charged with monitoring Maher would have wide discretion over his treatment.

“If they decide to put a lot of pressure on him, humiliate him and treat him like they treat thieves and drug dealers, they could order him to spend each night of the coming three years at the police station,” Al Awadi said.

Maher’s wife, Reham Ebrahim, welcomed his release in a Facebook post, saying “We will make up for what we missed.” The two have a son and a daughter.