In September, news leaked that the Thai immigration authorities had made an unusual arrest in Bangkok.
The detainee was Nur Sajat Kamaruzzaman, a glamorous, 36-year-old Malaysian cosmetics entrepreneur with a huge social media following.
The Malaysian authorities immediately sought her extradition on charges of insulting Islam, which had been brought against her in January, and which are punishable by up to three years in prison.
Nur Sajat’s offence was to wear a baju kurung, the traditional long-sleeved outfit worn by Malay women, at a private religious ceremony she held in 2018.
Nur Sajat is a transgender woman, and as such she was given refugee status and allowed by Thailand to seek asylum in Australia.
In the eyes of the Malaysian authorities, Nur Sajat is considered male, and under Islamic law, a man cannot dress as a woman.
Speaking to the BBC from Sydney, she said she had no choice but to flee, after being assaulted by officers from JAIS, the religious affairs department in the state of Selangor, which had brought the charges against her.
“I had to run away. I was treated harshly, I was hit, pushed, handcuffed, all in front of my parents and family. I felt ashamed and sad. I gave them my cooperation, but they still did that to me,” she said.
“Maybe it was because they see me as a trans woman, so they did not care if I was held, beaten, stamped on. We trans women have feelings too. We deserve to live our lives like normal people.”
Nur Sajat is a successful, self-made entrepreneur. Seven years ago, she says, she began promoting herself on social media. She developed her own skincare and health supplements, doing particularly well with a corset carrying her brand name.
With an immaculately-groomed appearance and playful social media posts, she gained hundreds of thousands of followers and became a national celebrity. Then the questions about her gender began.
It had never really been a secret. Nur Sajat took part in a famous transgender beauty contest in Thailand in 2013, winning an award for her dance.
What raised eyebrows in Malaysia was that she was also an observant Muslim and posted pictures wearing the hijab, the Islamic head covering for women.
She explained to those who asked that she had been born with both male and female genitalia, or intersex – a condition which in Islam is treated with more tolerance than those who change their birth gender.
In 2017, Nur Sajat announced that physically she was now fully a woman, and posted a doctor’s report to support it.
The authorities decided to investigate. JAKIM, the Department of Islamic Development, said it would need proof that she was born intersex. It offered to help Nur Sajat with what it called “gender confusion”.
There was more controversy last year when pictures were published of Nur Sajat, dressed in women’s prayer garments, with her family on a pilgrimage to Mecca, sparking criticism from conservative Muslims.
She later apologised for being the cause of such an uproar, but within a year she was facing criminal charges.
“When I was in the holy land I just wanted to ask myself… maybe there is a reason for how I was born?” Nur Sajat said. “As a transgender woman, and Muslim, I believe I have the right to express my religion in my own way. There is no reason for them to punish me as if they are doing God’s work.”
The BBC asked the Malaysian Religious Affairs Department to comment on Nur Sajat’s case but has not had a response.