Meriam Yehya Ibrahim, 27, who was sentenced to death in May for converting from Islam to Christianity, has been released from a Sudanese prison on the order of a Sudanese judge on Monday.

The order comes after an appeals court found the first judgment was faulty, according to CNN. Ibrahim's lawyer filed for an appeal.

Ibrahim was sentenced to death in May while pregnant with her second child by her American Christian husband, Daniel Wani. She gave birth to a girl in prison later that month while still in leg shackles. Her husband was not allowed to visit. She refused to renounce her Christian faith and was sentenced to get 100 lashes and then be hanged for apostasy, or renouncing one's Muslim faith, which is punishable by death under Shariah law.

Ibrahim's case drew international criticism and appeals for reconsideration, including from British Prime Minister David Cameron and former Secretary of State Hillary Clinton.

Ibrahim's father was a Muslim and her mother a Christian. Her father left the family when she was six and she says she was raised Christian. 

Ibrahim and her immediate family have been moved to a safehouse "for her protection and security," according to a member of her legal team who cites previous threats.