Rights groups have accused the Bangladesh government

Bangladesh police arrested a 25-year-old social media activist as he tried to leave the country on charges that he defamed Islam and the Prophet Mohammed, authorities said Tuesday.

Immigration police detained Asaduzzaman Noor, known as Asad Noor on his Youtube channel, at Dhaka airport on Monday evening, inspector Mohammad Shahidullah told AFP.

"The charge against him is that he hurt religious feeling by mocking Prophet Mohammed and made bad comments against Islam, the prophet and the Koran on Facebook and Youtube," he said.

Shahidullah said hundreds of Muslims staged demonstrations against Noor this year in the southern coastal town of Amtali after the head of an Islamic seminary filed a case against him.

Noor was charged under Bangladesh's strict internet laws and could face up to 14 years in jail if found guilty.

Rights groups have accused the Bangladesh government of muzzling dissent and targeting atheist bloggers who have used social media to criticise religion.

In 2013, four Bangladeshi bloggers were arrested after nationwide protests in which Islamic groups demanded the execution of atheist commentators. They were later freed.

In recent years, atheist and secular voices have been targeted by Islamist extremist groups, who have hacked to death a dozen bloggers, publishers and activists, and forced others to flee overseas.

Following the attacks, the government launched a crackdown on extremist groups.

In July last year however militants stormed a Dhaka cafe and massacred 22 hostages, including 18 foreigners, in an assault claimed by the Islamic State group. Security forces have since killed more than 70 alleged militants.