Uganda has a long and, until relatively recently, quite permissive LGBT history. During precolonial times, the “mudoko dako,” or effeminate males among the Langi of northern Uganda were treated as women and could marry men. Religious roles for cross-dressing men (homosexual priests) were historically found among the Bunyoro people. The Teso people also acknowledged a category of men who dressed as women.
In Buganda, one of the largest traditional kingdoms in Uganda, certain forms of same-sex relations were institutionalised. Young men served in the royal courts and provided sexual services for visitors and elites. It was an open secret that Kabaka (king) Mwanga II, who ruled in the latter half of the 19th century, was gay.Homosexuality in Uganda was criminalized in 1902.