In a lively beach resort town along the eastern Gulf coast of Thailand, a queer experiment is quietly taking place behind bars.

Under order from the country's Department of Corrections, Pattaya Remand Prison is one of a handful of facilities separating gay and transgender inmates from the jail's general population to protect them from harassment and assault.

Transgender women who have gone through sex change surgery sleep in a separate cell at the female zone of the Pattaya Remand Prison. | (EPA/RUNGROJ YONGRIT)

More than 6,000 of Thailand's 300,000 incarcerated people are registered sexual minorities, the Associated Press reports. Of Pattaya Remand Prison's more than 4,000 inmates, 10 are transgender females who have undergone gender-reassignment surgery. Thanks to the new pilot program, these women reside in a "female zone." During the day, all women commingle for meals, work, and activities — like, beauty, baking, and embroidery lessons. But at night, trans women and lesbians sleep in cells separate from the other women.

"If we didn't separate them, people could start fighting over partners to sleep with," one warden told AP. "It could lead to rape, sexual assault, and the spread of disease."

A group of female transgender inmates prepare to enter their separate cell at the female zone of the Pattaya Remand Prison. | (EPA/RUNGROJ YONGRIT)

There are, however, some holes in the system: Transgender inmates who haven't had surgery must remain in the sector matching their biological sex, which means many transgender women are forced to live with men and are denied the hormone medication that helps them transition. Though they are allowed some freedoms of self expression — they can wear makeup, for example, and more feminine clothing — they have to shave their heads like the other male prisoners. Just as in the female zone, non-surgical trans women and gay men sleep in separate quarters from the broader male population, but spend their days working, eating, and socializing together.

Though flawed, these prison pilot programs have been deemed so successful that authorities are now considering an LGBTQ-exclusive jail. But critics worry such correctional segregation could encourage exclusion within the system and elsewhere. "There is a significant difference between a public health policy aiming at preventing transmissible diseases and segregating a segment of the population on the basis of their sexual orientation or gender identity," one expert told AP.

In some ways, the mixed reviews for this prison program mirror the nation as a whole. Thailand has a reputation for being an Asian oasis for LGBTQ people — even going so far as to market itself as a "pink" tourist destination. But at the same time, critics say the country still has a long way to go.

Here's a snapshot of the lives of the transgender inmates trying to navigate this imperfect trial on Thailand's road to inclusivity:

A transgender woman in the male zone of the Pattaya Remand Prison. | (EPA/RUNGROJ YONGRIT)

Female transgender inmates wash prisoners' uniforms as part of their daily work in the male zone. | (EPA/RUNGROJ YONGRIT)