The court in the northwestern city of Nouadhibou sentenced the man, identified by the Reuters news agency as 28-year-old Mohamed Cheikh Ould Mkhaitir, to death for apostasy in an article he published almost a year ago. Some other agencies gave other variations of his name, but it was clear they were referring to the same individual.

The AFP news agency cited a judicial source who said that the defendant fainted when the ruling was read out in the court, He was subsequently revived and taken to prison. It wasn't immediately clear whether he intended to appeal the sentence.

The same source said that in the article in question, the blogger had questioned some of the decisions the prophet had taken during holy wars.

During the trial, the defendant had pleaded not guilty, telling the court that it was "not his intention to harm the prophet."

The prosecution called for the death penalty to be carried out in keeping with Sharia law, recommending that he be shot.

Cheikh Ould Mkhaitir had been in investigative custody since January 2, when he was arrested over the article, which briefly appeared on a number of websites in Mauritania, and sparking street protests against it.

The reading of Thursday's verdict drew cheers outside of the courtroom.

Mauritania hasn't executed a prisoner since 1987, and according to AFP, it has not delivered a death sentence for apostasy since it gained its independence from France in 1960.

pfd/jr (AFP, Reuters, dpa)