Same-sex relations have been criminalized in Uganda since British colonial times. Sections 145 on “unnatural offenses” and 148 on “indecent practices” have been retained in the Penal Code since independence. “Carnal knowledge against the order of nature” between men carries a maximum sentence of life in prison. The so-called “Anti-Homosexuality Act,” which foresaw imposition of the death penalty for same-sex relations, was first passed by the parliament of Uganda in 2013 and signed into law by President Museveni in early 2014. It was invalidated by the Constitutional Court of Uganda on procedural grounds the same year. Rumors of a resurrection have been circulating ever since, with the death penalty foreseen not only for same-sex relations, but also for promotion and "recruitment" of homosexuality. In May 2021, the Parliament of Uganda passed the Sexual Offences Bill. Purportedly the Bill aims to prevent sexual violence, enhance punishment against sexual offenders and provide additional protection for victims, however, it also reinforces the ban on same-sex relations.
Police regularly target, abuse, and arrest people on the basis of their presumed sexual orientation and gender identity, with forced anal examinations used against those detained, purportedly to gather evidence. Although the laws do not explicitly mention transgender and gender-nonconforming individuals, law enforcement officials often conflate gender identity with sexual orientation, and, as such, trans people are detained and charged under the same laws. Government officials have repeatedly shut down Pride events, LGBTIQ events and conferences, and raided LGBTIQ-friendly social spaces. Films, TV shows, and radio programs have been banned for “homosexual content.” Violence from private individuals is also high, and hate speech in the media is strong. Uganda has an enthusiastic and persistent LGBTIQ activist community, despite threats, violent attacks, and arbitrary arrests.
The passage of the bill follows the government’s closure of the human rights organization Sexual Minorities Uganda (SMUG) in August 2022, and the refusal to register several other organizations that work to advance LGBTQ people’s human rights. The Ugandan government also threatened in February 2023 to close the UN Human Rights office in the country, seeking to silence the voices of allies.