A three-judge Federal Court panel ruled by a 2-1 majority that only the Islamic Shariah Court has the power to allow Lina Joy, who converted to Christianity in 1998, to remove the word "Islam" from the religion category on her government identity card.
"This appeal is rejected," Chief Justice Ahmad Fairuz Sheikh Abdul Halim said. "Apostasy is a matter linked to Islamic laws. It's under the jurisdiction of the Shariah court ... Civil courts cannot interfere.
"She cannot simply at her own whims enter or leave her religion," Judge Ahmad Fairuz said. "She must follow rules."
The ruling is likely to drive another wedge in the Malaysian society which has become increasingly polarized in recent years with Buddhist, Christian and Hindu minorities complaining that their religious rights are held hostage to Islam. Muslim groups that say Islam is under threat because of people like Joy hailed the verdict.
Dozens of Muslims gathered outside the domed court house in the administrative capital of Putrajaya, and shouted "Allahu Akbar," or "God is great," when they heard about the verdict.
Judge Richard Malanjum, the only non-Muslim on the panel, sided with Joy, saying it was "unreasonable" to ask her to turn to the Islamic Shariah court because she could face criminal prosecution for apostasy there.
He said the constitution was the supreme law of the land and Joy — who was not present at Wednesday's hearing — should have the freedom to choose her religion.
Joy, 43, was born a Muslim and named Azlina Jailani by her parents. In 1998, the National Registration Department granted her request for a name change on her government identity card but refused to drop Muslim from the religion column.
She appealed the decision to a civil court but was told she must take it to Shariah courts. A series of rejected appeals brought her case finally to the Federal Court, with Joy arguing all along that she should not be bound by Shariah law because she is a Christian.
If Joy insists on practicing Christianity now, she could be charged with apostasy — the abandonment of a faith or belief. In Malaysia, the offense is punishable by fines and jail sentences. Offenders are often sent to prison-like rehabilitation centers.
Joy's case is the most prominent in a recent series of religious disputes, some involving the custody of children born to parents of different faiths, and one involving a deceased Hindu man who converted to Islam without his family's knowledge and whom Islamic authorities ordered to be buried as a Muslim.
Muslim Youth Movement President Yusri Mohammad praised the verdict.
"We fully believe justice has been served," he said. "It should be seen as a rejection of attempts by certain individuals, certain parties, to deconstruct and radically revamp our current formula" for religious issues".
But others said the verdict failed to protect religious rights.
"People like Lina Joy shouldn't be trapped in a legal cage, not being able to come out to practice their true conscience and religion," said Leonard Teoh, a Malaysian Catholic lawyer.
"It's a major blow and a grievous setback to Malaysia as a secular nation," opposition politician Lim Kit Siang said. "It has cast shadows over fundamental liberties and civil rights in the country."
The Rev. Hermen Shastri, secretary of the Council of Churches of Malaysia, said conversion was a personal matter and that no one has the right to "play God."
"We still go by the possibility that the constitution allows any citizen of the country to exercise his or her right to choose a religion and practice it," he said. "This ruling will not stop anybody from exercising that right."
The Malaysian Constitution guarantees freedom of religion to all citizens. But it also says Islam is the official religion.
This has tacitly given the Shariah courts — which govern the personal and family rights of Malaysian Muslims — the upper hand in disputes involving Islam.
Generally, the Shariah courts have not allowed Muslims, who comprise nearly 60 percent of the country's 26 million people, to legally leave their religion.
Civil courts, that govern personal laws of non-Muslims, have opted to remain subordinate to the Shariah courts even though the constitution is vague on who has the higher authority.
Joy has been disowned by her family and forced to quit her computer sales job after clients threatened to withdraw their business.
She and her ethnic Indian Catholic boyfriend, known only as Johnson, went into hiding in early 2006 amid fears they could be targeted by Muslim zealots, Joy's lawyer has said.
It is not known what her next court of action would be.