While the cause of gay rights has made remarkable progress in the United States over the past year—with recent court rulings in New Mexico and Utah mandating recognition of same-sex unions—the situation has been bleak in other corners of the world. Two weeks ago, the Ugandan parliament passed a long-debated bill imposing lifetime sentences for gay sex acts, as well as harsh penalties for those who “promote” homosexuality. The latter clause is similar to the notorious law passed unanimously by the Russian Duma in June, which bans “propaganda of non-traditional sexual relationships.” But perhaps the most surprising development occurred in the world’s largest democracy, India, where that country’s Supreme Court overturned an earlier ruling striking down a ban on sodomy as unconstitutional.

India and Uganda are located on separate continents and boast different religious traditions, yet they share a common history: both are former colonies of the British Empire. And it is in this shared legacy where many gay activists have located a culprit responsible for the two countries’ latter-day anti-gay sentiment. “Gays have been marginalized like crazy since British rule came to India,” an Indian expatriate protesting the ruling outside the country’s embassy in Washington told the Washington Blade, a gay newspaper. “It’s only when the British came that they marginalized the third-gender [transsexual] people that they’ve been living on the edge of society. And we’ve somehow failed to move beyond that.”

This view was echoed by the bestselling gay Indian author Vikram Seth, who told The Guardian that, “You find homosexuality in the Kama Sutra … In the Hindu tradition, the Muslim tradition, the syncretic [tradition] … there has never been intolerance of this kind.”

That Victorian-era British laws—namely, section 377 of the Indian Penal Code, inherited from the Raj, or British imperial government, which prohibits sexual relations “against the order of nature”—are responsible for the official homophobia in the now-independent countries of the former empire is a persistent theme of today’s global gay rights movement. “Half the world’s countries that criminalize homosexual conduct do so because they cling to Victorian morality and colonial laws,” Scott Long, former director of the lesbian, gay, bisexual, and transgender rights program at Human Rights Watch, said in 2009. “Getting rid of these unjust remnants of the British Empire is long overdue.”

Of course it is. But is homophobia in decolonized countries merely a “remnant of the British Empire?”

Today, no society that outlaws homosexual acts—which by their invidious and discriminatory nature condemn all gay people themselves—should be deemed decent or humane. As this shocking list attests, homosexuality remains illegal in nearly 80 countries; it is punishable by death in Mauritania, Sudan, Saudi Arabia, Iran, Yemen, and parts of Nigeria and Somalia. With last month’s court ruling in India, gay sex is illegal now in 42 of the 53 members of the Commonwealth of Nations, the concert of independent countries once ruled by the British. Nigeria, Sudan and Somalia, former British colonies all, opted to go further and instate the death penalty after independence, indicating that their anti-gay fervor is very real, not just a matter of an unforced law that they haven’t gotten around to repealing. Likewise, in Uganda, the attempt to heighten punishment for homosexuality comes over four decades after the country gained independence from Great Britain.

As unjustified as the British’s proscription of homosexuality in the lands of their Empire (itself a reflection of the country’s own Victorian mores on the mainland, where homosexuality would not be decriminalized until 1967) undoubtedly was, it is wrong to lay blame for contemporary non-Western homophobia at their feet. Places like Uganda and India do not outlaw homosexuality today “because” of “Victorian morality and colonial laws,” as Long would have us believe. Such an explanation assumes that pre-colonial lands were places of Edenic sexual tolerance and permissiveness, paradises of sexual enlightenment where all colors in the LGBTQI etc. etc. rainbow were able to express themselves without fear until the big bad Limeys entered the picture. Not only was homophobia of some sort present in many of these places, but few of them had any written legal code comparable in sophistication to that introduced by the British, rendering comparisons of unwritten pre-colonial customs with the highly formalistic conventions of the British Empire sketchy at best.

Moreover, the governments of former British colonies have repealed all sorts of colonial-era laws, from ones that effectively limited voting rights to white settlers to those that regulate the sale of goods. So why are all of these anti-gay laws still stubbornly on the books?

The answer presumably lies in the fact that they remain popular among significant and influential swathes of the populations and governing classes to whom they apply. The Indian Supreme Court, for instance, is hardly a reactionary body committed to the upholding of British imperial practices. According to The Guardian, “The institution is known for its broadly progressive judgments, which often order politicians or officials to respect the rights of the poor, disadvantaged or marginalized communities.” Yet that “progressive” reputation does not extend to the rights of homosexuals. Far from maintaining an “alien” prejudice against homosexuality unknown to them before the arrival of the British, many of these societies have simply reasserted regressive religious and societal mores.

“These people are not speaking with the tradition of Indian tolerance … with the sense of getting on with each other, which is at the heart of Indian-ness,” Seth told The Guardian, as if “Indian-ness” were an aggregate, homogenous trait. Yet India remains one of the most socially stratified societies in the world, a place with a millennial-old caste system where even personal ads specifically mention an individual’s social class (the lowest being “Untouchable,” relegated to cleaning toilets and living in vast slums). Just witness the country’s indignant reaction to the fact that one of its diplomats would face legal sanction in the United States for forcing a housekeeper to work punishingly long hours for less than minimum wage (“The issue of the treatment of domestic help does not resonate in India as it does in the United States,” the New York Times politely described the contretemps; “nearly all officials in New Delhi have maids working dawn to dusk six or seven days a week, and generally earning even less than Ms. Richard did.”) This stark reification of class is a far cry from the sense of social solidarity about which Seth waxes so proudly, and must also be seen as a part of “Indian-ness,” however one wishes to define it. Given these attitudes, it is hard not to see how discrimination against homosexuals would also have a place in Indian culture, just as it does in every culture.

Or take the case of Robert Mugabe, president-for-life of Zimbabwe, a former British colony that exited the Commonwealth after having been suspended for human rights abuses. He is the African revolutionary par excellence who continues to rage against imagined British “colonialism” every day. Yet for all his fulminating against the British Empire and its wicked ways, he retains Victorian-era prohibitions and prejudices against homosexuality. He has called it “un-African” and demeaned gay people as “worse than dogs and pigs.” After British gay activists set upon his motorcade in 1999, Mugabe said that then-Prime Minister Tony Blair was responsible for ordering “gay gangsters” to attack him. Having fought against colonialism and everything for which it stood, why would Mugabe selectively choose to embrace this one “vestige” of the Empire?

The attempt to cast homosexuality in the lands of the former British Empire as due to exogenous factors ignores the very real intrinsic factors at play. According to a 2013 survey by the Pew Global Attitudes Project, “acceptance of homosexuality is particularly widespread in countries where religion is less central in people’s lives. These are also among the richest countries in the world. In contrast, in poorer countries with high levels of religiosity, few believe homosexuality should be accepted by society.” In other words, in places where people are relatively well off and secular, i.e., Western democracies, homosexuality is accepted, whereas in places where they are relatively religious (particularly Islamic) and poor, i.e., undeveloped countries, which characterizes much of the former British Empire, homosexuality is scorned. The poll found generally tolerant attitudes in North America, Latin America and Europe, and generally intolerant attitudes in Africa, Asia, and Russia.

As the conception of a homosexual identity and the concurrent demand for gay equality took root in the West, many non-Western leaders began identifying homosexuality itself as a foreign, specifically Western import. This has presented an interesting paradox; whereas it was once Western colonialists who proscribed homosexuality and saw it as a sinful activity practiced by uncivilized natives, today it is the descendants of those colonized people who rail against Western depravity. This is not to lend credence to the ignorant claims of leaders like Mugabe or Uganda’s Yoweri Museveni, who has alleged homosexuality to be “a decadent culture … being passed by Western nations.” Homosexuality is present in all cultures, and has been present in all cultures throughout recorded human history.

Homophobia in the developing world is not just a mass phenomenon; it serves the populist agendas of unscrupulous political leaders. Anti-gay laws strengthen the state at the expense of the individual and shore up nationalist fervor, something that many governments in former British colonies, few of them model democracies, wish to do. They can also be utilized opportunistically to whip up anger against political enemies. Take the politically motivated prosecution of Anwar Ibrahim, an opposition leader in the Malaysia, a former British colony where Islam is the official religion. From 1998 to 2012, that government waged a long legal battle against him based on spurious charges of sodomy. Of all the possible ways to indict a political enemy, why would the Malaysian regime have pursued this particular, prurient charge unless it had some belief that the accusations would inspire disgust among most Malaysians? “The British people accept homosexual [government] ministers,” the country’s prime minister at the time said, echoing Mugabe and Museveni. “But if they ever come here bringing their boyfriend along, we will throw them out. We will not accept them.”

Laying the blame for homophobia in former colonial lands at the feet of those who engage in it hardly lets Great Britain off the hook. We were reminded of that country’s own shameful record just last week, when its government belatedly pardoned Alan Turing, the mathematical genius who broke the Nazi enigma code and committed suicide in 1954 after being chemically castrated due to his homosexuality. Great Britain didn’t decriminalize homosexuality until 1967 (the United States followed suit only in 2003, when the landmark Supreme Court ruling of Lawrence v. Texas invalidated all state sodomy laws directed at same-sex couples).

Regardless of the role that one British intellectual tradition, Victorianism, had in establishing anti-gay legislation in the lands over which it ruled, it is another British intellectual tradition, liberalism, that will lead these countries away from it. Just as it was British Victorian mores that encouraged anti-gay laws, it was the British liberal tradition that freed countries from such punitive practices. That’s why former British colonies like Australia and New Zealand—liberal democracies—have decriminalized homosexuality, while places like Pakistan and Uganda, authoritarian states, retain anti-gay laws, and will likely only repeal them as part of a process of becoming more democratic and reducing the role of religion in the state.

An irony in the whole debate over gay rights in the non-Western world is that anti-gay attitudes are now embraced by self-proclaimed “anti-imperialists” and “anti-colonialists” to differentiate themselves from louche, permissive, depraved Western societies. Whereas the British Empire may have once exported Victorian values a century and a half ago, today, it is the major force for progressive change throughout the Commonwealth—alongside, of course, local LGBT activists fighting their governments’ policies and societies' ignorance.. Last year, Queen Elizabeth, Victoria’s great-great-granddaughter, signed a Commonwealth document calling for an end to “all forms of discrimination, whether rooted in gender, race, color, creed, political belief or other grounds.” According to the Daily Mail, “‘other grounds’ is intended to refer to sexuality—but specific reference to ‘gays and lesbians’ was omitted in deference to Commonwealth countries with draconian anti-gay laws.” In 2011, British Prime Minister David Cameron, who bucked the majority of his Conservative Party by supporting gay marriage, signaled that Britain might restrict foreign aid to members of the Commonwealth that discriminate against gays.

Pretending that homophobia is nothing more than a “vestige” or “remnant” of British imperialism that was exported to its erstwhile colonies, as opposed to a very real manifestation of religious and social mores, deprives present-day Ugandans, Indians, Pakistanis, and the rest of the formerly colonized of responsibility for their actions, and robs them of agency. This is ironic, as the animating principle of anti-colonialism is for Westerners to view their former colonial subjects as individuals capable of making their own decisions. It also treats the problem of homophobia as mere legalism, presuming that the repeal of a law written 150 years ago—a formality—is all that stands in the way of social acceptance. But the problem of homophobia is deep-seated in these societies, and will not go away with a changing legal code.