KUALA LUMPUR: A Muslim woman sentenced to be caned for drinking beer has had her punishment commuted, in a surprising turnaround for a high-profile case that raised questions about Islamic laws intruding into personal matters in Malaysia.

Kartika Sari Dewi Shukarno, a mother of two, received a letter Wednesday from the Pahang state Islamic department informing her that the state's sultan has decided to spare her the caning, her lawyer, Adham Jamalullail, said Thursday.

The order is likely to cool a fiery debate over whether Islamic laws are intruding into people's private lives in the Muslim-majority country, which has long been seen as a model of a moderate and progressive Islamic society. Many people had condemned the punishment, saying it shows conservative Islamists are gaining influence over the justice system.

Kartika, a former model and nurse, was sentenced last July. Had the punishment been carried out at the time, she would have been the first woman to be caned in Malaysia.

She pleaded guilty and did not appeal her sentence, but the punishment was halted at the last minute following an uproar in the media and among rights activists.

Three other Muslim women were caned this year for having sex out of wedlock, becoming the first Muslim women to be caned. Their cases did not draw as much attention because the caning was kept secret until after it was done. Subsequently, the women appeared before local media and said they deserved the punishment.

Adham told The Associated Press that "as a substitution for the caning, the sultan has ordered Kartika to perform community service for three weeks."

It was not clear what prompted Sultan Ahmad Shah to commute the sentence, but he could have been influenced by the negative publicity that Malaysia received after the caning sentencing.

The sultan is the guardian of Islam in the state, and its titular head. Most of Malaysia's 13 states are ruled by sultans who usually play a ceremonial role in governance but have the power to rule in Islamic matters.

Kartika's father, Shukarno Abdul Muttalib, said she has been told to report to the Islamic department Friday.

"We will abide by the order ... Kartika will go on with her life," he said.

Kartika had been sentenced to six strokes of the cane and a fine of 5,000 ringgit ($1,400) for drinking beer in December 2007 at a beach resort in violation of Islamic laws. Islam prohibits Muslims from drinking alcohol.

Officials had said the caning would be very different from the corporal punishment administered to male criminals under secular laws. Drug offenders, kidnappers and others are caned with a thick rattan stick on bare buttocks, breaking the skin and leaving lifelong scars.

Kartika's punishment under Islamic laws would have been delivered with a thin cane on the back with her clothes on.

The sultan's commutation of the sentence followed a meeting last month between Kartika and the Pahang crown prince to discuss her fate after the caning was delayed. It was unclear what occurred at the meeting because Kartika declined to speak to reporters.

Malaysia follows a dual-track justice system. Shariah laws apply to Muslims in all personal matters. Non-Muslims — Chinese, Indians, Sikhs and other minorities — are covered by civil laws, and are free to drink.

Only three states in Malaysia — Pahang, Perlis and Kelantan — impose caning for drinking alcohol. In the other 10 states it is punishable by a fine.