"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," Malay-language newspaper Sinar Harian quoted sharia judge Kamalruazmi Ismail as saying on Sunday.
The two women, ages 22 and 32, had been "attempting to engage in sexual acts," Terengganu prosecutor Muhamad Khasmizan Abdullah told Reuters. Police arrested them in a car in April on suspicion of being lesbians.
The women confessed in court on Sunday to breaking sharia law, which forbids sexual relations between women, to having had sex. They were each sentenced to six strokes with a cane and fined 3,300 ringgit, or $806, Khasmian told AFP. Free on bail, their caning is scheduled for August 28, but they have the right to appeal their sentence.
"The caning would be carried out within the court premise," he said. "Under the sharia rules, they will be whipped with a rattan cane on their back with their clothes on while they are seated."
"This is a serious case. The prosecutors urged the court to impose the maximum sentence," Khasmizan said. The maximum sentence for sodomy is 20 years in prison, Reuters noted.
"This verdict is a first for us," the prosecutor said, noting that prosecutions under these laws are rare.
Malaysia has a dual-track legal system, Channel News Asia explains, in which Islamic courts handle religious and family matters.
Malaysia's LGBTQ community has been under increasing attack in recent years as Islamist groups press for stricter and wider application of sharia in the country, led by the conservative Malaysian Islamic Party.
"Consensual sex acts between adults is not a crime," a coalition of Malaysian human rights groups said in a joint statement following the ruling, which includes transgender rights group Justice for Sisters and the All Women's Action Society.
In February, Sinar Harian published a widely condemned article that provided a list of ways to identify LGBTQ people, the Guardian reported at the time. Some of the things it noted included that gay men love beards and branded clothing and that lesbian women often hug each other and belittle men.
In January in Indonesia's Aceh province, which is across the Malacca Strait from Malaysia and is the only province in the country that abides by strict Islamic law, a series of raids resulted in the arrest of 12 transgender women, who were publicly humiliated until they stated they were no longer transgender, BBC reported at the time. It's not against Islamic law to be trans, but because trans women are seen as men, they were punished under the law banning homosexuality.