Two Malaysian women convicted under strict Islamic law for trying to have sex were caned in public on Monday, a punishment condemned as "atrocious" by human rights activists.

The Muslim women, ages 22 and 32, were struck six times with a rattan cane on their backs by female prison officers as they sat on stools facing judges. The caning in a Shariah courtroom in Terengganu state was witnessed by more than 100 people, according to human rights activists and family members.

“This is a terrible day for LGBTI rights, and indeed 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 in the government’s efforts to improve its human rights record," said Rachel Chhoa-Howard of Amnesty International. The group noted that caning amounts to torture, which is prohibited under international law.

The women reportedly were discovered in April. The state's Sharia high court sentenced them Aug. 12 to six strokes of a cane for "sexual relations between women" and fined them the equivalent of about $800.

The caning comes amid a climate of intolerance against LGBT people in Malaysia, human rights activists say. In recent weeks, gay establishments have been raided and politicians and government officials have made discriminatory statements, according to Amnesty International. A transgender woman also was beaten up by a group of people in a southern state.

More:Taiwan on verge of history as first Asian country to allow same-sex marriage

More:'Not just about a cake shop': LGBT people battle bias in everyday routines

More:3 years after same-sex marriage ruling, protections for LGBT families undermined

Malaysian religious affairs minister Mujahid Yusof Rawa ordered portraits of LGBT activists removed from an arts festival in Penang in early August, sparking an avalanche of criticism. "I have consistently repeated in Parliament that we do not support the promotion of LGBT culture in Malaysia," he said at the time.

Muslim Lawyers’ Association deputy president Abdul Rahim Sinwan defended the caning of the two unidentified women, insisting that the punishment under Islamic law isn't painful and was intended to teach the women to repent. The women, who were dressed in white, didn’t cry or scream but “showed remorse,” he said. "Repentance is the ultimate aim for their sin.”

A witness to the caning, Thilaga Sulathireh of the group Justice for Sisters, blasted the punishment as torture. “It’s a regression of human rights in Malaysia. It’s not about the severity of the caning. Corporal punishment is a form of torture regardless of your intention.”

Lawmaker Charles Santiago called on the government to repeal laws that criminalize homosexuality. “We really need to make sure that no one is publicly caned ... because of their sexuality,” he said.

Nearly two-thirds of Malaysia’s 31 million people are Muslims, who are governed by Islamic courts in family, marriage and personal matters. Malaysia is seen as a moderate and stable Muslim-majority country, but there has been a shift toward increasingly conservative Islam in recent years.

Contributing: The Associated Press