KHARTOUM, Sudan — A Sudanese woman on death row for apostasy had her sentence cancelled and was ordered released by a Khartoum court on Monday, the country’s official news agency reported.

SUNA said the Court of Cassation cancelled the death sentence against 27-year-old Meriam Ibrahim after defence lawyers presented their case. The court ordered her release.

Ibrahim, whose father was Muslim but who was raised by her Christian mother, was convicted of apostasy for marrying a Christian. Sudan’s penal code criminalizes the conversion of Muslims to other religions, a crime punishable by death.

Ibrahim married a Christian man from southern Sudan in a church ceremony in 2011. As in many Muslim nations, Muslim women in Sudan are prohibited from marrying non-Muslims, though Muslim men can marry outside their faith.

Ibrahim has a son, 18-month-old Martin, who was living with her in jail, where she gave birth to a second child last month, local media reported. By law, children must follow their father’s religion.

The sentence drew international condemnation, with Amnesty International calling it “abhorrent.” The U.S. State Department said it was “deeply disturbed” by the sentence and called on the Sudanese government to respect religious freedoms.

Sudan introduced Islamic Shariah law in the early 1980s under the rule of autocrat Jaafar Nimeiri, a move that contributed to the resumption of an insurgency in the mostly animist and Christian south of Sudan. The south seceded in 2011 to become the world’s newest nation, South Sudan.

Sudanese President Omar Bashir, an Islamist who seized power in a 1989 military coup, has said his country will implement Islam more strictly now that the non-Muslim south is gone.

A number of Sudanese have been convicted of apostasy in recent years, but they all escaped execution by recanting their new faith.