Tunisia's President Moncef Marzouki said Wednesday he would free a young Tunisian man jailed last year for posting cartoons of the Prophet Mohammed online once tensions in the country had eased.
Jabbeur Mejri was sentenced at a closed hearing in March 2012 to seven and half years in jail for posting caricatures of the Prophet on his Facebook page.
He petitioned the president for a pardon earlier this year, saying he regretted his actions.
"I will have him freed. I am just waiting for the political situation to calm down," Marzouki said in an interview with French radio station France Info.
"There are currently huge tensions, there is the fight against terrorism," he said.
"But I will free him, I am simply waiting for the right window of opportunity both for his security and for the security of the country."
Mejri and his co-defendant Ghazi Beji, both unemployed and militant atheists, were charged with "publishing works likely to disturb public order" and "offence to public decency".
Beji fled abroad and was given asylum in France in June this year.
The case stirred up controversy in Tunisia, with secular opposition groups and human rights activists arguing that the defendants were convicted for a "crime of conscience".
Tunisia has been mired in political stalemate after the assassination of two prominent opposition leaders by suspected jihadists earlier this year.
Critics of the Islamist party Ennahda, which heads the coalition government, have repeatedly accused it of seeking to Islamise society and of using religion to stifle freedom of expression.