BANDA ACEH, Indonesia (Reuters) - Indonesia’s national police chief has ordered an investigation into the detention of 12 transgender women in the province of Aceh, officials said on Friday, after reports that they were stripped, beaten and forced to cut their hair before being released without charge.

Muslim protesters hold an anti-LGBT rally outside a mosque in the provincial capital Banda Aceh, Aceh province, Indonesia February 2, 2018 in this photo taken by Antara Foto. Antara Foto/Irwansyah Putra/ via REUTERS

Indonesia has the world’s largest Muslim population but Aceh, on the northern tip of Sumatra, is the only province that enforces Islamic law and outlaws homosexuality.

Religious police and vigilantes in the ultra-conservative province often raid homes and places of work and detain people on suspicion of engaging in homosexual activity.

Police in North Aceh raided hair salons - where transgender people often work - last weekend and briefly detained 12 individuals. Rights activists and media reports said they were forced to cut their hair and were stripped and beaten.

“There were photos circulated that led us to suspect that there had been physical action taken against the suspects,” Misbahul Munauwar, a spokesman for Aceh police, said. “The national police chief has instructed us to investigate those photos and to determine if there was any...procedural or ethical violation.”

A national police spokesman confirmed that police chief Tito Karnavian had ordered the investigation.

Human Rights Watch and other rights groups welcomed the move, which comes amid a rising tide of hostility against the lesbian, gay, bisexual, and transgender community.

Police in Aceh and elsewhere have stepped up raids on what they call “gay spas” and “gay sex parties” in recent months, detaining people on charges of violating strict anti-pornography laws.

Dozens of protesters on Friday staged an anti-LGBT rally outside a mosque in the provincial capital Banda Aceh.

“We don’t hate gay, bisexual or transgender people. What we hate is their actions, and if we can prove their actions, they will be punished,” Aceh governor Irwandi Yusuf told the small crowd.

Last year, the provincial and central governments drew international condemnation after authorities in Aceh tried two young men on charges of engaging in gay sex and then publicly caned them - the first such case in the country.

Indonesia’s parliament is also drafting revisions to the national criminal code that could ban all consensual sex outside marriage.

The parliamentary commission drawing up recommendations has still to finalize its proposals, but a draft seen by Reuters includes measures to criminalize extramarital sex, same-sex relations and co-habitation, all of which were previously unregulated. [nL4N1PO3OW]