In a statement, the group “urged governments everywhere to affirm international human rights standards and reject the oppressive legacies of colonialism by repealing laws that criminalize consensual sexual activity among adults of the same sex.” The 66-page report, “This Alien Legacy: The Origins of ‘Sodomy’ Laws in British Colonialism,” describes how laws in more than three dozen countries, from India and Uganda to Nigeria and Papua New Guinea, derive from a single law on homosexual conduct that British rulers imposed on India in 1860. (The High Court in Delhi recently ended hearings in a years-long case seeking to decriminalize homosexual conduct, and a ruling in the landmark case is expected soon.)

“In the early 19th century, the British drafted a new model Indian Penal Code, finally put into force in 1860,” HRW said. “Section 377 punished ‘carnal intercourse against the order of nature’ with up to life imprisonment. Versions of Section 377 spread across the British Empire, from Africa to Southeast Asia.”

Many of the laws persist despite the fact that England and Wales decriminalized gay sex in 1967, Scotland did so in 1981, and Northern Ireland saw its sodomy ban struck down by the European Court of Human Rights in 1981. “From Malaysia to Uganda, governments use these laws to harass civil society, restrict free expression, discredit enemies and destroy lives,” said Scott Long, director of HRW’s LGBT Rights Division.