KUALA LUMPUR (Reuters) - Two Malaysian women convicted of attempting lesbian sex in a car were caned in court watched by dozens of people on Monday, media and a state government official said, prompting an outcry from human rights activists.

The lesbian, gay, bisexual and transgender (LGBT) community is routinely persecuted in Muslim-majority Malaysia, where they are seen as a threat to conservative values.

The women, aged 32 and 22, had pleaded guilty last month to attempting lesbian sex, forbidden under Islamic law. They were sentenced to a fine and six lashings of the cane.

The sentence was carried out in front of about 100 people at the Sharia High Court in Terengganu, a conservative state ruled by the Islamist opposition party Pan-Malaysian Islamist Party (PAS), according to a report by English-language daily the New Straits Times.

It was the first conviction for same-sex relations and the first time a caning had been carried out in public in the state, Satiful Bahri Mamat, a member of the Terengganu state executive council told Reuters.

“Sharia criminal procedure allows the court to determine where the sentence will be carried out, and requires that it must be witnessed by a number of other Muslims,” said Satiful, who attended the hearing. Sharia is Islamic law.

Satiful said the punishment was “not intended to torture or injure”.

“The reason it is carried out in public is for it to serve as a lesson to society,” he said.

Malaysia has a dual-track legal system, with Islamic criminal and family laws applicable to Muslims running alongside civil laws.

The caning of women is banned under civil law, but allowed under Islamic laws in some states.

Amnesty International said the caning marked “an appalling day” for human rights in Malaysia.

“To inflict this brutal punishment on two people for attempting to engage in consensual, same-sex relations is an atrocious setback on the government’s efforts to improve its human rights records,” Rachel Chhoa-Howard, the group’s Malaysia researcher, said.

Malaysian women’s groups Justice for Sisters and Sisters in Islam called for a review of laws that allowed the caning of women.

“The execution that took place... is a travesty and a grave miscarriage of justice,” the groups said.

The case comes amid concerns around growing intolerance toward the LGBT community in Malaysia in recent weeks.

A transgender woman was beaten up by a group of assailants in Seremban, south of Kuala Lumpur on Aug. 15, in what activists said was part of a growing hostility towards gay and transgender people.