Meriam Yahya Ibrahim is a free woman today – albeit in hiding. She was ordered released from prison by a Sudanese appeal court after spending the past few months incarcerated. She entered prison while eight months pregnant and gave birth there. Her crime? According to a Sudanese lower court ruling, Ms. Ibrahim had committed apostasy by refusing to recant her Christian faith. And for this, she was sentenced to death.

Her lawyers argued that Ms. Ibrahim had never professed Islam, and thus never committed apostasy. Her Muslim father abandoned the family when she was 6; she was raised by her Christian Orthodox mother and chose to follow Christianity. Later, she married another Christian and they started a family together.

For reasons that are unclear, some of Ms. Ibrahim's relatives complained to state authorities that she had converted from Islam to Christianity. An investigation was launched and she was found guilty of apostasy – renouncing her faith. According to Sudan's version of sharia law, children of Muslim fathers are de facto Muslims, and the penalty for apostasy is death. Since Ms. Ibrahim was pregnant, she was ordered imprisoned until the weaning of her newborn, after which she was to be executed.

Story continues below advertisement

The case sparked outrage throughout the world, and rightfully so. Human rights groups, Western governments and ordinary citizens called for Ms. Ibrahim's release. To their credit, her Muslim lawyers argued that the sentence was in violation of Sudan's 2005 constitution, which guarantees freedom of religion. The appeal court agreed and ordered her unconditional release. Fearing reprisal from relatives, Ms. Ibrahim and her family have gone into hiding.

Some point to this case as an example of how apostasy laws can be misused to settle personal grudges, or to divert attention from government misdeeds. The potential abuse is reason enough to do away with the law, they argue.

Yet there is something inherently wrong with a law that calls for the execution of an individual who chooses to renounce their religion. At the heart of the matter is an individual's fundamental, and highly personal, choice of belief. The Koran makes it clear that "there is no compulsion in religion," and nowhere does it prescribe death for an apostate.

In a detailed study of apostasy, Dr. Jamal Badawi, professor emeritus at Saint Mary's University, points out the obvious: "It is inconceivable to attain … peace if any person is forced or coerced to become a Muslim or to remain a Muslim against his or her free will."

There are many accounts of apostates being brought before the Prophet Mohammed – including his personal scribe – who were left unharmed. Renunciation of faith, unaccompanied by sedition or treason, did not warrant punitive action.

With time, professed faith defined the status of citizenship. Islamic laws regarding apostasy were developed within particular political and social conditions, in which Muslim identity was inextricably linked to the Islamic empire. Apostasy was seen as the equivalent of treason against the state.

While times have changed, views rooted in medieval Islamic law have not. According to a recent Pew Research Center study, 20 countries – all with a Muslim majority – prohibit apostasy. Pew has also found that a majority of Muslims in Afghanistan, Pakistan, Malaysia, Egypt, Jordan and the Palestinian territories favour the death penalty for apostates.

Story continues below advertisement

This is problematic, that large numbers of Muslims view a highly personal religious choice as a political statement punishable by death – a view shaped by history more than by the tenets of the faith itself.

But asking Muslims to simply discard their faith and join 21st century secularism, or denigrating medieval Islamic laws will only harden attitudes. Another way forward is a reformative path that affirms the fundamental sources of Islam, namely the Koran and the example of the Prophet, in light of the 21st century.