Sitting on the concrete floor next to the toilets it was hard to hear Justin, a tall bookish man in his mid-20s, over the din of a live cover band.

The band’s repertoire included the odd Coldplay hit, but their sound was swamped by the voices of 300 or so visitors packed into a sweltering space a little bigger than a classroom.

It's visiting time at one of Jakarta’s notorious prisons. Officials have bizarrely attempted to foster a festive spirit behind the razor wire and surly guards. Rows of picnic tables are crammed with families. Along with the (rather good) band is a photo booth complete with batik backdrop to commemorate visits with uniformed inmates. Snacks and bottles of water are available at reasonable prices. Girlfriends snuggle with tired looking boyfriends. On the walls are posters declaring that visits are free of charge.

“That’s actually not true,” Justin tells me motioning to the posters. “The guards hit me up for Rp25,000 (US$1.80 – enough to buy cigarettes) when I have visitors.”

In Justin’s world nothing is as it seems. To start with Justin isn’t his real name. He is in prison because he was rounded up along with 200 or so gay men during intermittent police raids, the most recent of which was earlier this month. I’ve agreed to withhold details of his case, including his age, profession and the exact circumstances of his arrest because he does not wish to antagonize the authorities.

At the moment of his arrest, Justin slipped behind the looking glass. Gay sex is legal here but police are closing down gay venues and arresting their clients anyway. Most of those detained are released but some, like Justin, are arrested because they’re naked in a public place. Police argue that they therefore violate the country’s pornography laws. Justin faces 10 years in prison if convicted. Rape causing bodily harm carries a sentence of just four years. Infanticide: seven years. Both sentences are as stipulated by Indonesia’s out-of-date criminal code, which the country inherited from the Dutch.

Indonesia is growing more conservative and its tolerance for minorities, fraught at the best of times, is on the wane. Jakarta’s newly minted governor, Anies Baswedan, last week called on the city’s Muslim majority to become “masters in their own house”. In his inaugural address, Baswedan drew criticism for using the term "pribumi", which mean indigenous, aboriginal or native, in a context that appeared to willfully exclude Indonesians of Arabic, Chinese or indeed any other descent. In April, he had leveraged support from Islamic conservatives to oust his reformist predecessor, Basuki Tjahaja Purnama, a Christian of ethnic Chinese descent. Purnama was later jailed for blasphemy in what was seen as a blow against tolerance and free speech.

Sexual minorities have come in for particular opprobrium as cabinet ministers vie with each other to ramp up anti-gay hysteria. This hysteria has a basis in the country’s 2008 pornography law, which likens gay sex to copulation with animals and corpses. Homosexuality for many here remains at best a fetish or at worst a cancer to be cut out.

“They yelled ‘you’re all scum,’” Justin tells me, recalling the moment when police stormed a sauna he frequented.

The initial aggression gave way to confusion as each official that Justin came into contact with struggled to make sense of him. One was a crime scene photographer seemingly oblivious to his hypocrisy when he chastised Justin for not having visited one of the city’s many massage parlors, where straight men pay for sex with women.

“’You could have gone to any of those places and you wouldn’t have had this problem,’” Justin recalls him saying.

Indonesia’s media has helped fuel paranoia with sensational details surrounding the arrest. This piece about a police raid of a sauna in May is worth running through Google translate if only for the novelty of reading the words “nasty activities” and “venting of sexual desires” used in a news story.

What shocked Justin most was the deafening silence and even derision that the arrests met with among gay men. On social media some called him “an idiot” for getting caught. Human rights groups protest the periodic crackdowns but so far there have been no public demonstrations.

“We talk about a LGBT ‘community,’” Justin says, using air quotes. “But we hide. We won’t help each other make our lives better.”

The silver lining is the reaction of his family, he tells me. He wasn’t out to his family or many of his friends. But after the initial shock of learning of his arrest they soon rallied.

“My mother cried for a few weeks but she’s fine now. I’m still her son.”

But for many he is no longer a son of Indonesia. Justin ought to be the pride of his country. Young and educated with a razor-sharp intellect, which he wields with flawless English, his future seemed assured. Instead he’s now a pariah.

“When I apply for a job they’re going to Google me and this will come up,” he says of his case.

“I have to fight.”