Tunis: A Tunisian jailed for posting caricatures of the Muslim Prophet Mohammad (PBUH) online was freed Tuesday, his lawyer said, two weeks after securing a presidential pardon.

Jabeur Mejri, 29, whose was seen as the first post-revolution prisoner of conscience, “is back home,” Ahmad Mselmi said.

Mejri had been jailed for seven and half years for posting the cartoons on his Facebook page. The case sparked a heated controversy in Tunisia, with secular opposition and human rights groups campaigning for his release.

On January 19 President Moncef Marzouki’s spokesman announced that the head of state had pardoned Mejri. But he was not immediately released as new charges against him emerged involving embezzlement dating back to the time when Mejri worked for the Tunisian railways — well before his imprisonment in March 2012 for posting the cartoons.

But his lawyer appealed and secured his release Tuesday. Mselmi said, however, that measures have been taken to guarantee Mejri’s safety after he had received threats from Salafist Muslim extremists.

The influence of Salafists, long oppressed under the rule of president Zine Al Abidine Bin Ali, has increased in Tunisia in the wake of the 2011 uprising that toppled the veteran strongman.

Mejri, an atheist activist, was an unemployed graduate at the time of his imprisonment in 2012, but had worked previously at the railroad ticket office in his hometown of Mahdia, south of Tunis.

The caricatures he posted online with his friend and Ghazi Beji were considered insulting to Islam. Mejri and Beji were convicted of “publishing works likely to disturb public order” and “offending public decency”, since Tunisia’s penal code does not punish blasphemy.

Their prison sentences came shortly after the rise to power of the secular Islamist party Al Nahda, which triumphed in Tunisia’s first free elections after the 2011 revolution. After the sentencing Beji fled to France where he obtained asylum last June.

Al Nahda was forced to step down last month after a protracted political crisis linked to a surge in Islamist violence. Amnesty International has called Mejri the first prisoner of conscience in Tunisia following the uprising that ousted Bin Ali.