Some historians like to claim socialist ideas helped bring about gay rights in the modern era. But they're mistaking academic theory for reality.

Jim Downs is a historian at Connecticut College and Harvard. A specialist in the history of race and slavery, he has recently published a new book, Stand by Me: The Forgotten History of Gay Liberation, in which he tries to move recent gay history away from an excessive focus on sex and AIDS.

Downs also has a new article in the digital magazine Aeon, in which he writes, "Throughout the 1970s, LGBT people theorised about the benefits of socialism in books and pamphlets and critiqued capitalism in the growing newspaper and print culture." He goes on to discuss "LGBT groups" and newspapers that "made socialism a leading subject of political interest in the movement." Most significantly he argues that "if you want to give credit for gay liberation and marriage equality, credit must also go to socialism."

There are several things wrong with this. First, it's overstated. I was around in the 1970s, and I'd say that socialism was a pretty marginal part of the gay community or even the gay rights movement. Gay activists definitely leaned left, but they were focused on advancing gay rights through the Democratic Party.

Second, there were gay libertarian writers around at the time, too, in academia, in the popular press, and oriented around the Libertarian Party, pointing out the benefits of free markets and the problems with socialism.

Third, the use of LGBT is anachronistic. The term was hardly if ever used in the 1970s. (He doesn't use it much in the book.)

But the claim is more than overstated. It's wrong. And Downs' own article offers the evidence. In the midst of his article on how socialism infused the gay rights movement and led to gay liberation, he notes the work of historian John D'Emilio on how "capitalism enabled LGBT to move to cities and to be independent from the family as a source of income. Once capitalism created the opportunity for people to live autonomously, it unwittingly allowed LGBT people to privilege homosexual desire as a driving force in their lives."

Despite his leftist leanings, D'Emilio saw the world more clearly than Downs does. All the advances in human rights that we've seen in American history—abolitionism, feminism, civil rights, gay rights—stem from our founding ideas of life, liberty, and the pursuit of happiness. The emphasis on the individual mind in the Enlightenment, the individualist nature of market capitalism, and the demand for individual rights that inspired the American Revolution naturally led people to think more carefully about the nature of the individual and gradually to recognize that the dignity of individual rights should be extended to all people.

Those intellectual trends quickly led to feminist and abolitionist sentiments. It took longer for people to take seriously the idea of homosexual activity as a matter of personal freedom and to recognize homosexuals as a group of people with rights. But the libertarians and their classical-liberal forebears got there first. From Adam Smith and Jeremy Bentham to the Libertarian Party and the Cato Institute (where I work), libertarians were ahead of the intellectual curve in applying the ideas of individual liberty to gay people.

Capitalism is more than an idea, of course. It's a set of social institutions, which Downs correctly notes came under scathing attack from gay socialists. But as D'Emilio recognized, it was capitalism that in fact allowed individuals to live autonomously and to flourish. Capitalism freed people from feudalism and from the family farm. It allowed them to construct their own lives in a market society with space for separate personal and professional lives. It gave them the freedom and affluence to live on their own.

Capitalism led to industrialization, which led to urbanization, which offered the anonymity of the city to anyone who chafed under the strictures of the family and the village, as well as the chance to find people who shared one's interests.

The writer Eric Marcus produced a book of interviews with gay activists called Making History. What his subjects illustrated—even when they didn't realize it themselves—was that it was the freedom to leave home and the affluence that allowed people to do so that enabled them to move and to choose lifestyles they wanted.

In 1982 the Australian scholar Dennis Altman wrote:

The real change in the past decade has been a mass political and cultural movement through which gay women and men have defined themselves as a new minority. This development was only possible under modern consumer capitalism, which for all its injustices has created the conditions for greater freedom and diversity than are present in any other society yet known. For those of us who are socialists, this presents an important political dilemma, namely how to guard those qualities of capitalism that allow for individual diversity while jettisoning its inequities, exploitation, waste, and ugliness.

Of course, anyone who finds "inequities, exploitation, waste, and ugliness" in capitalist countries probably hasn't lived in socialist countries. But like D'Emilio, Altman understood the real institutional foundations for modern gay life and gay identity.

These effects of capitalism didn't happen just in Europe and the United States. In China's Long March to Freedom, the Chinese-American scholar Kate Zhou writes that when housing was owned and allocated by the state, it was generally allocated only to married couples. Once housing was privatized, single people and gay couples could purchase or rent accommodations. Freer property markets have also led to the creation of gay bars, something that state housing authorities would not have been likely to allow.

Look around the world, and it's clear that the countries with the most freedom for gay people are those with a high degree of economic freedom. Countries that are actually socialist rank at the bottom of every measurement of political freedom, civil liberties, personal freedom, and LGBT rights.

Of course, some countries that are called "socialist," such as Denmark, Sweden, and Canada, are not in fact socialist. They have political and economic systems based on private property, free markets, liberal values, and high levels of taxes and transfer payments—not quite libertarian but definitely market economies.

That's not what the gay socialists of the 1970s were aiming for. They wanted real socialism, an end to market relationships. The countries that have implemented such a system, from the Soviet Union to Tanzania to Venezuela, have been rather less successful at sustaining both prosperity and personal freedom than the capitalist countries.

Those gay intellectuals talked a lot about socialism, but they lived in capitalism. And it was the capitalist reality, not the socialist dreams, that liberated gay people.