Two gay men were publicly caned in the conservative Indonesian province of Aceh on Tuesday, the first to be punished under Islamic laws introduced two years ago that outlawed gay sex. As the BBC's Rebecca Henschke reports, the case has deeply worried Aceh's gay community.
Salman (not his real name) joined the crowd of hundreds to watch the public caning.
He flinched as the convicted men, dressed in white gowns, stood on a stage murmuring prayers while a team of men dressed in hoods took turns to lash their backs with sticks.
The two men closed their eyes in pain while the crowd cheered.
"It's horrible, it's terrifying, it could happen to me," Salman said.
"I think now I should be more careful about how I behave. My partner is not in Aceh at the moment but I worry about my future."
Salman is Acehnese and stays here so that he can look after his elderly mother - leaving is not an option for now.
"There are lots of people in the gay community who are smart and have lots to contribute to Aceh but now they are scared and they have to hide their sexuality. Many others are leaving."
We were treated like animals
Gay rights activist Hartoyo travelled up from Jakarta for the caning.
In 2007, he too was caught with his boyfriend in Aceh, when he was an aid worker helping to rebuild the province after the devastating 2005 tsunami.
"The police urinated on my head and beat the two of us up, we were treated like animals," he recalls.
"I was lucky that homosexuality wasn't officially a crime then," he says.
A day before the public caning, I went with Salman to the prison to meet one of the convicted men.
He was terrified, his hands and body shaking. He was nervous and said at first he didn't want help from the gay community:
"I have been deeply depressed in jail, I am trying desperately to be accepted here, I am trying to pull myself out of a dark hole."
What he wanted was to go home to his family and return to his old life, he says.
Before neighbourhood vigilantes broke down his rented room door, he was in his final years of a medical degree.
But returning to that life will be hard.
Read more on this:
Aceh's Sharia code empowers local vigilantes to publicly identify and detain anyone suspected of violating the rules.
And that includes breaking and entering someone's house to catch people in their most private moments.
Mobile phone footage of the raid that circulated online shows the men naked and visibly distressed. One of them appears to call for help on his phone.
"Raids like that are allowed under our laws," says Illiza Sa'aduddin Djamal, the mayor of the provincial capital, Banda Aceh. "They were in a rented room."
"The neighbours were suspicious; they knew what was going on. But they needed to get proof."
In February last year, she wrote on her Instagram account that she was going to "flush" LGBT people out of Aceh, below a picture of her pointing a pistol.
"I want to save our next generation," she told me. "Imagine what it would be like if the whole world started liking the same gender."
"We don't hate them as people, what we hate is what they do."
Veranda of Mecca
Aceh is believed to be one of the first places Islam entered Indonesia and is often referred to as the "veranda of Mecca".
Acehnese separatist rebels, known as GAM, fought a decades-long brutal separatist war to break away from Indonesia.
It wasn't until the devastating tsunami hit the province in 2004 that peace talks started in earnest.
And in a peace deal made with the national government in 2006, Aceh was granted the right to practise Sharia.
At the time, Acehnese political leaders promised the law would not affect religious minorities and would respect international human rights, but it has become an increasingly strict code.
And the Sharia police have been accused of human rights violations and abuse of power.
Last year a Christian woman became the first non-Muslim to be caned under the regulations. Her crime was selling alcohol.
And there was international outrage a few years ago when a vigilante gang raped a woman in the town on Langsa.
They had raided her home and found her with a married man. Accusing them of committing adultery, the men, one of whom was a 13-year-old boy, raped the woman, before marching the couple to the Sharia police.
I went to Aceh at the time and met with the head of the Sharia police in Langsa. He told me she was to blame, because she was wearing "super sexy clothes".
"I think any normal man would have been provoked."
He said then he would have liked to have seen both of them stoned to death.
"The man would be buried at the crossroads and whoever passes throws a stone until he dies. The women would be buried and stoned to death," he said.
'The shame hurts the most'
For now Aceh's Sharia doesn't allow stoning, but it is getting stricter.
Before the caning this week of the gay men, an organiser warned the crowd not to attack them. "They are also human," he said.
He also told all children to leave the area. "This is not something children should watch," he said. But a number of parents ignored that.
"This is a positive punishment that creates a better society for all and is our right under our autonomy law," H A Gani Isa, the head of the Ulama council of Aceh, told the crowd.
Our driver in Aceh, Brandi, says he has had quite a few friends who have been caned - for drinking and gambling.
"They say it is the shame that hurts the most, the cane not so much," he says
One of his friends has been caned three times.
"But it hasn't stopped him from drinking, and he even takes a selfie before the caning now," he laughs.
Acehnese leaders are quick to state that their right to enforce Sharia came after a bloody civil war.
But rights groups have strongly criticised the use of caning.
The New York-based group Human Rights Watch says it constitutes torture under international law.
'My family accept me'
Syeril, a transgender woman in Aceh, says LGBT people now need to be "very careful about how we dress and how we behave and what we say".
"We don't wear sexy clothes for example, we can't do that anymore," she says with a smile.
But she says her family are comfortable with her sexuality. They were senior members of GAM and are still politically powerful.
She says she was often beaten by Indonesian soldiers looking for her rebel brothers during the civil war, and survived the tsunami and says she is a true Acehnese.
"I am a little bit scared after what's happened to others. But I don't have a problem personally because my family and my village accept me.
"They have always been very good to me and whatever happens I will not leave them," she says.
No place to hide
Gay rights activist Hartoyo didn't end up watching the caning.
After he posted his plan to attend on social media, an online campaign began calling for him to be forced out of the province. Men in the crowd were asking where he was.
He now wants to reach out to the caned men and see if they want help to get out of Aceh and go to the capital, Jakarta.
"I want them to know they are not alone and there is a safer place."
But after this week's arrest of 141 men at a gay sauna in the capital, Jakarta, and similar arrests in the city of Surabaya, the space for Indonesia's LGBT community is dramatically shrinking.