In 1860, a committee of British lawyers finished a sentence that would outlive the empire that wrote it.

Section 377 of the Indian Penal Code punished carnal intercourse “against the order of nature” with up to life imprisonment. Human Rights Watch, in a report called This Alien Legacy, describes it as the first colonial sodomy statute written into a penal code, and the model for dozens that followed across Asia, Africa and the Pacific. Britain exported it the way it exported railway gauges. Malaysia inherited a version, as did Myanmar, Singapore, Brunei and Sri Lanka. The Human Dignity Trust’s history of LGBT criminalisation tracks how long those clauses lingered; Singapore only repealed its version in the past decade.

Siam is absent from that ledger. No colonial legislature sat in Bangkok drafting statutes, and no district magistrate applied imported morality to a population that had never asked for it. What Siam had was a monarchy negotiating furiously to avoid becoming anybody’s protectorate, and that turns out to matter for how gender got policed.

What a penal code actually does

A criminal statute works as a filing system as much as a punishment. Section 377 required colonial societies to sort their populations into people who did the normal thing and people who did the unnatural thing, and once that sorting exists in law, it seeps into medicine, schooling, policing and family expectation. Loose categories harden, and the hardening is the damage.

Thailand never ran that sorting exercise on its own people, at least not with any conviction. Peter Jackson, an emeritus professor of Thai history at the Australian National University, documents the reason in the journal Intersections: Siam did write an anti-sodomy clause into its legal code in the first decade of the twentieth century, but it wrote it as theatre. European powers had imposed extraterritorial legal regimes under the unequal trading treaties, so their nationals escaped Siamese law until it looked sufficiently “civilised”. A sodomy clause was part of looking civilised.

Not once was it used to convict someone for homosexuality.

Jackson’s review of the Thai legal archives turns up a single prosecution under the clause, an unsuccessful bestiality case, and nothing else. It sat unused for fifty-six years before being quietly struck from the books in 1956, in a clean-up of obsolete edicts. Jackson also points out that Thai Buddhism, unlike the Christianity that arrived with the gunboats, treats consensual same-sex conduct between lay people as no sin. The only sexual prohibition on the laity concerns adultery.

The regendering of an entire country

Here is where the story stops being flattering. Escaping colonisation did not mean escaping Victorian gender norms, because Siam went and fetched them itself.

Nineteenth-century European visitors kept complaining that they could not tell Siamese men from Siamese women. Both wore the jong kraben, a length of cloth wrapped and tucked between the legs, and cropped their hair short. Both often went uncovered above the waist. Western travel writing treated this as evidence of a backward race, and Siamese elites, reading those accounts, understood exactly what was being implied and what it might justify.

Chulalongkorn’s government issued Siam’s first public dress decree in 1899, a moment that Kanjana Hubik Thepboriruk, writing in Southeast Asian Studies, marks as the start of a formal link between clothing and morality in Siamese law. His successors tightened the rules in the years that followed. Then came Field Marshal Plaek Phibunsongkhram, who between 1939 and 1942 issued twelve state edicts known as the ratthaniyom, banning the jong kraben outright and putting men in trousers and women in skirts, hats and gloves. His government went further still in 1941, when the Names of Persons Act required a married woman to give up her own surname for her husband’s, folding personal identity into the same drive toward a fixed, legible gender for every citizen.

Villagers who turned up at government offices in traditional dress were refused service, and it took decades of that kind of enforcement, not persuasion, to make the new norms stick.

Why visibility arrived late

Jackson’s most counterintuitive finding sits inside that history. Before the Second World War, Western accounts of Bangkok barely mention cross-dressing, and Thai-language sources are nearly as quiet. Travellers described a whole population as androgynous rather than a distinct minority as transgressive.

Visible gender-crossing requires a sharp gender line to cross. Once the state had spent ninety years installing that line, trousers here and skirts there, the kathoey, Thailand’s term for transgender women, became legible, and press reports multiplied from the 1950s onward. One historian’s argument is not settled consensus, and scholars who locate deeper roots in Buddhist cosmology have contested Jackson’s reading. Still, it reframes the popular story. The visible third gender is less a relic that survived the colonial era than something the modern Thai state accidentally brought into focus.

What carried through was the absence of a punishment mechanism. No register of offenders, no medical establishment building careers on cures, no church calling it damnation. Space survived; protection came later, and unevenly.

Where the gap shows up now

That distinction still shapes Thai law. Thailand has no procedure allowing transgender people to change the sex or title on their identity documents. A 2018 legal review by UNDP and the Department of Women’s Affairs and Family Development set out the gap in detail, as did the 2021 Human Rights Watch report “People Can’t Be Fit into Boxes”. Every transgender Thai carries paperwork that contradicts them, at the bank, the hospital, the polling station and the job interview.

Marriage law moved faster. The Marriage Equality Act took effect on 23 January 2025, making Thailand the first country in Southeast Asia to recognise same-sex marriage, as noted by the UN Human Rights Office in Bangkok. Couples queued at a Bangkok shopping mall to register on the first morning.

Countries that inherited Section 377 have spent decades in court arguing their way out of a sentence written by strangers. Thailand skipped that fight and arrives at a different one, which is that a gender recognition bill has been drifting between drafts and committees for close to twenty years. Nobody has to repeal anything. Somebody just has to write it.