An Algerian blogger has been detained for posting cartoons on the Internet mocking President Abdelaziz Bouteflika, and is due to stand trial for "contempt" and "defending terrorism," his lawyer said Wednesday.

Abdelghani Aloui, 24, has been held in custody since September 25 and faces several charges, including "attacking the person of the president," Amine Sidhoum told AFP.

The blogger allegedly published cartoons ridiculing Bouteflika and Prime Minister Abdelmalek Sellal on his Facebook page.

The charge of "defending terrorism" relates to the fact that he was "in possession of a scarf on which was written the phrase 'There is no God but God'" Sidhoum said, referring to the Muslim declaration of faith.

"My client was received today (Wednesday) by a specialist judge at the Algiers criminal court who decided to keep him in custody. Tomorrow we will file a request for bail," he said.

In June 2012, another blogger received an eight-month suspended jail sentence and a 1,000 euro ($1,350) fine after calling on the Internet for a boycott of Algeria's legislative elections.