Two women in Malaysia have been sentenced to caning for having sex with each other.

The ruling, by a sharia court in the conservative state of Terengganu, sparked outrage from human rights activists who said the lesbian, gay, bisexual and transgender (LGBT+) community is facing increasing pressure from the Muslim-majority government.

The women, aged 32 and 22, were arrested in April after being found in a car in a public square. After pleading guilty they were sentenced to six strokes with a cane each and a 3,300 ringgit (£633) fine, according to Malay-language newspaper Sinar Harian.

“Adequate punishment must be meted out so that this becomes a lesson and reminder to not just the two of you, but the members of society,” sharia judge Kamalruazmi Ismail said, according to the daily.

Caning does not take place in public view in Malaysia.

The women were released on bail and their sentence is set to be carried out on 28 August, although they have the right to appeal.

Malaysia has a dual-track legal system, with sharia courts managing some religious and family cases. Civil law stipulates jail for up to 20 years, caning and fines for oral or anal sex (whether same-sex or otherwise).

The country’s Muslims are also governed by state-level Islamic laws, most of which carry provisions banning gay and lesbian sex.

Amnesty International Malaysia said caning amounted to torture and called on the government to repeal laws that impose punishment against marginalised communities.

The court ruling indicated a “concerning climate” of LGBT+ discrimination and a “growing threat on the lives and the safety” of LGBT+ people in Malaysia, the group’s interim executive director Gwen Lee said in a statement.

A coalition of 10 Malaysian organisations issued statements condemning the ruling and calling it a “gross violation of their dignity and human rights”.

“Consensual sex acts between adults is not a crime,” said the coalition, which includes groups such as Justice for Sisters, All Women’s Action Society and Association for Women Lawyers.

“We are extremely concerned about the impact of the punishment not only on the two women, but also on the LGBTQ population as a whole.

“We are also extremely concerned about the escalating attacks and repression against LGBTQ persons in Malaysia, and the impact of such punishment in this environment.