Ms Kartika had not appealed against her sentence
A Malaysian woman sentenced to be caned for drinking beer has had her punishment commuted.
Kartika Sari Dewi Shukarnor had pleaded guilty to the offence under Malaysia's Islamic law and was to have received six strokes of a rattan cane.
But her family said religious officials had overturned the ruling, ordering her to carry out community service instead.
Ms Kartika's original sentence, which had been delayed several times, had provoked fierce debate.
While drinking alcohol is forbidden for Muslims, prosecutions are rare.
Ms Kartika's family was informed by letter that the sultan of Pahang state, where Ms Kartika was arrested for drinking beer in a beachfront hotel in December 2007, had overturned the ruling.
The religious leader has the power to rule on matters of Islamic law.
"The sultan has decided that the caning sentence will be substituted with a three-week community service at a children's home in Pahang from 2 April," Ms Kartika's father, Shukarnor Mutalib, told the AFP news agency.
"Kartika was expecting a caning, she is surprised by this development as she will be separated from her children for three weeks, but we respect the sultan's decision," he said.
"We will abide by the order. Kartika will go on with her life," he told the Associated Press news agency.
The commutation was welcomed by Malaysia's Bar Council, which had called caning "anachronistic and inconsistent with a compassionate society".
"Our view is that no one should be caned. We are against any form of corporal punishment," council Ragunath Kesavan told the AFP news agency.
The case had caused controversy in Malaysia, where Muslims are subject to Islamic law in personal matters, and attracted international criticism.
Ms Kartika, a mother of two, had not appealed against her sentence and had asked that her punishment be carried out in public.
When first convicted, she seemed set to become the first woman to be caned in Malaysia.
But in February, three women were caned at a prison near the capital, Kuala Lumpur, for having extra-marital sex, leading to fears Ms Kartika's punishment would also go ahead.