A Sudanese judge has sentenced a Christian woman to hang for apostasy, despite appeals by Western embassies for compassion and respect for religious freedom.

The case, thought to be the first of its kind to be heard in Sudan, involves a woman whose Christian name is Mariam Yahia Ibrahim Ishag.

"We gave you three days to recant but you insist on not returning to Islam," Judge Abbas Mohammed Al-Khalifa told the woman on Thursday, addressing her by her father's Muslim name, Adraf Al-Hadi Mohammed Abdullah.

"I sentence you to be hanged to death."

Khalifa also sentenced Ishag to 100 lashes for "adultery".

Ishag, who rights activists say is pregnant and 27 years old, reacted without emotion when Abbas delivered the verdict at a court in the Khartoum district of Haj Yousef.

Earlier in the hearing, an Islamic religious leader spoke with Ishag in the caged dock for about 30 minutes.

Then she calmly told the judge: "I am a Christian and I never committed apostasy."

Sudan's government introduced Islamic law in 1983 but extreme punishments other than flogging are rare.

After the verdict, about 50 people demonstrated against the decision.

"No to executing Mariam," said one of their signs while another proclaimed: "Religious rights are a constitutional right."

In a speech, one demonstrator said they would continue their activism with sit-ins and protests until she is freed.

"The details of this case expose the regime's blatant interference in the personal life of Sudanese citizens," Sudan Change Now Movement, a youth group, said in a statement on Wednesday.

A smaller group supporting the verdict also arrived but there was no violence.

"This is a decision of the law. Why are you gathered here?" one supporter asked, prompting an activist to retort: "Why do you want to execute Mariam? Why don't you bring corruptors to the court?"

Political distraction

Speaking to AFP news agency on Wednesday, Ahmed Bilal Osman, Sudan's information minister, said: "It's not only Sudan. In Saudi Arabia, in all the Muslim countries, it is not allowed at all for a Muslim to change his religion."

But experts in Islamic law called the ruling outrageous.

"The punishment has little to do with religion and serves as a political distraction," Mohamed Ghilan, an expert in Islamic jurisprudence, told Al Jazeera. "This is a ploy by the Sudanese regime to appear as 'defenders of Islam' to mitigate their corruption."

Activists have become increasingly vocal against Bashir, underscoring perceived corruption, political impasse and a plethora of internal conflicts.

Faced with these challenges, the Sudanese government finds itself politically marginalised, Ghilan said. "The punishment is an attempt to give the regime legitimacy with the more conservative crowd."

"Historically, this sort of punishment was only implemented in cases where people didn’t just simply convert due to lack of conviction, but they would also join an opposing force," Ghilan said.

In this context, apostasy was tantamount to treason, according to Khaleel Mohammed, associate professor of religion at San Diego State University.

"One did not get sentenced to death simply for converting. Unfortunately, this does happen in certain places like Afghanistan and Sudan, but these judges are not very educated in Islamic law and are working from a tribal perspective."

Further, even in the context of war, women were historically excluded from punishment, Ghilan said. "Women could not be executed because of the vehement declaration of the prophet not to harm women."