Amid chants of "Allahu akbar", huge and angry crowds gathered outside the Supreme Court in Mauritania on Tuesday demanding the execution of a man who complained about religion being used to justify social discrimination.

In December 2013 engineer Mohamed Ould Cheikh Ould Mkhaitir wrote an article for a website about Mauritania's caste system, including prejudice against the low-status blacksmith class. His article also referred to similar practices in the time of the Prophet.

Two days after the article appeared Ould Mkhaitir was arrested and has been in jail ever since. His family reportedly disowned him, his marriage was dissolved on grounds of apostasy and his lawyer abandoned him. A Mauritanian businessman also offered a substantial reward for anyone who succeeded in killing him.

In December 2014 Ould Mkhaitir (also known as Mohamed Cheikh Ould Mohamed) was convicted of apostasy "for speaking lightly of the Prophet" and sentenced to death. Ould Mkhaitir told the court it was "not his intention to harm the prophet", according to a judicial source quoted by AFP. For more background on the case see previous blog post and a recent article in IB Times.

Apostasy is a capital offence in Mauritania though no one has been executed there for many years. Those convicted of apostasy are allowed three days to repent – in which case they will be spared execution but imprisoned for an unspecified time.

The purpose Tuesday's Supreme Court hearing was to determine whether Ould Mkhaitir, now aged 31, has "sincerely" repented. The court has been coming under heavy external pressure not to accept his repentance.

Last month, Mauritania's Forum of Imams and Ulemas called for him to be executed "with no exception made for his repentance". Their statement said: "We demand that the competent authorities apply the law: kill him and bury him in conformity with the law of God."

According to the International Humanist and Ethical Union (IHEU), which is monitoring the case through local contacts, some of the demonstrators outside the court on Tuesday were armed. One banner, bearing the name of the "Group of Lovers of the Prophet" said in Arabic: "We demand the execution of Ould Mkhaitir immediately".

IHEU also said prosecution lawyers were accusing Ould Mkhaitir's lawyers of apostasy and calling on them to "repent" for defending him.

The case was adjourned until December 20 when a final verdict is expected.

UPDATE, 21 December 2016: The Supreme Court adjourned its decision in the case.