A Malaysian woman who was due to be caned for drinking beer was today set free by religious authorities, but could still face the punishment after the Islamic holy month of Ramadan.

A sharia court in the eastern state of Pahang had sentenced Kartika Sari Dewi Shukarno, 32, to six strokes of the cane after she was caught drinking alcohol at a hotel lounge in December 2007.

If the sentence is carried out, she will become the first Malaysian woman to be caned, a move that would heighten fears that the moderate Islamic state – where Malay Muslims make up about 60% of the population – is taking a harder line in a battle for votes with an opposition Islamic party.

An official said that Shukarno would still be caned, but that the attorney general's office had advised that the punishment be delayed until after Ramadan – a period of fasting and prayer – for "compassionate reasons."

"The sentence is not being cancelled," Mohamad Sahfri Abdul Aziz, a state legislator in charge of religious affairs, told the Associated Press.

Shukarno, a mother of two who had been working as a nurse in Singapore until her case was made public, was being driven from her father's house in the northern Perak state to a prison near Kuala Lumpur to receive her punishment when she was abruptly driven back home and released.

Initially, she refused to get out of the van until her release had been confirmed in writing.

"I will not come out without a black and white document explaining the status of what has happened. I am surprised and speechless," she told reporters.

Her father, Abdul Mutalib Shukarno, who persuaded her to leave the vehicle, said the authorities' change of heart risked exposing Islam to ridicule. "My daughter wants the sentence to be done," he said. "I'm afraid that people will make fun of the religion. Don't make my daughter a toy to play with."

Shukarno's case attracted international attention after she asked for the punishment to be carried out in public, a request that may have embarrassed officials into postponing the caning.

The part-time model said she respected sharia law, which forbids alcohol consumption by Muslims, and distanced herself from calls by Amnesty International for the sentence to be commuted.

Drinking alcohol – which is legal among Malaysia's non-Muslim minorities – is punishable by caning and up to three years in prison, although most offenders escape with a fine.

Men sent to prison for more serious crimes, including rape, are caned on their bare buttocks and left permanently scarred.

The authorities had said Shukarno would remain fully clothed during her punishment, which would be carried out with a lighter, smaller cane than the one used for men.