We cannot find distinct gay men or lesbians in the past because distant cultures had no conception of sexuality as an identity, as Michel Foucault, James Davidson and Giulia Sissa have shown (Michel Foucault, The Care of the Self, Vintage, 1988). The ancient Greek man may have cruised the Acropolis looking for teenage boys, but he was just as happy to find a female slave – and he went home to his wife. It is tempting to imagine such past cultures as oases of toleration, when people didn’t care who a man slept with. Tell that to Timarchus, deprived of his citizenship in ancient Athens for supposedly selling sex (James M. Davidson, The Greeks and Greek Love, Weidenfeld and Nicolson, 2008; Giulia Sissa, Sex and Sensuality in the Ancient World, Yale University Press, 2008).

Today we think of Islamic societies as sexually repressive and homophobic. But, unlike in early Christianity, sexual pleasure in early Islam was not seen as bad in itself, as long as a man just had sex with his own wives or slaves. Muslim authorities even excused coitus interruptus for the purposes of birth control. Sufi mystics adored the beauty of male youths, with their downy cheeks, as a pathway to adoring the beauty of God and some men adored young men for more sensuous reasons. At the same time the effeminate man who had sex with other men was scorned and stigmatised. During the 19th century western orientalists began to denigrate (or sometimes exoticise) Islamic societies for what they saw as a tolerance for homosexual relations. In response Persian and Arab intellectuals began to repudiate the heritage of male-male love. They were not just echoing government mandates or western experts, however. Rather, nationalists were demanding that their governments modernise society by supporting modern monogamous romantic marriage (Janet Afary, Sexual Politics in Modern Iran, Cambridge University Press, 2009; Afsaheh Najmabadi, Women with Mustaches and Men without Beards: Gender and Sexual Anxieties of Iranian Modernity, University of California Press, 2005).

The French philosopher and historian Michel Foucault argued that Victorian sexual repression was a myth, that instead of a silence there was a proliferation of discourses about sex. Medical doctors, psychiatrists and sexologists obsessively categorised sexual variations. But Hera Cook argues that sexual repression was a reality. She does not see sexual desire as a natural force that was suppressed; rather, if sex was constructed, people had to learn about sex and, if the only messages they received were negative, sexual expression would be inhibited. In fact, she argues, abstinence was an important means of birth control just about until the invention of the pill. ‘I have a headache tonight, dear’, was a way middle-class women refused to have too many children (Hera Cook, The Long Sexual Revolution: English Women, Sex and Contraception 1800-1975, Oxford University Press, 2004).

Victorian sexual silence had its advantages for some – close female friendships were celebrated, even when women longed to kiss and hug each other all night – because society thought they weren’t sexual. In fact, Sharon Marcus argues, intimate female friendships and even female partnerships bolstered conventional Victorian marriages (Martha Vicinus, Intimate Friends: Women Who Loved Women, 1778-1928, University of Chicago Press, 2004; Sharon Marcus, Between Women: Friendship, Desire, and Marriage in Victorian England, Princeton University Press, 2007). But, as the recent BBC film The Secret Diaries of Miss Anne Lister shows, some of these women were having passionately sexual relationships.

By the late 19th century, and even more in the first decades of the 20th century, sex radicals broke through into public debate, agitating for birth control and sexual rights. In Weimar Germany they founded birth-control clinics and spread sex education. A gay and lesbian subculture flourished – think Cabaret, but less depressing: more like lesbian cruises down the Rhine and sexy working-class men in tight Tshirts. We think of the Nazis as repressive, persecuting homosexuals and banning abortion and birth control for the ‘fit’Aryans; abortions could be forced on the ‘unfit’Jews, disabled people and those of mixed race. But Dagmar Herzog, in Sex after Fascism: Memory and Morality in 20th- Century Germany (Princeton University Press, 2005) has revealed that many Nazis were very much for sex – as long as it produced more little Aryan Nazis. Some Nazis even thought that men who had sex with other men could be rehabilitated as soldiers.

More recently historians have complicated the familiar narrative that the 1960s exploded the sexual repression of the 1950s in Europe. Matt Houlbrook has argued that the increased tolerance extended to ‘respectable’homosexuals in 1950s’London yet further marginalised the ‘poofs’, working-class men who enjoyed being effeminate and who even sold sex (Queer London: Perils and Pleasures in the Sexual Metropolis, University of Chicago Press, 2005). Frank Mort cliams that the sexual revolution actually began in the 1950s in the sexy subcultures of Soho (Capital Affairs: London and the Making of the Permissive Society, Yale University Press, 2010). But Hera Cook asserts that the widespread use of the contraceptive pill from 1960 onwards really did make a substantial difference to women’s sexual freedom.

Today the new sexual horizon is online. Prostitution seems to have declined a great deal, but in part it is because streetwalkers now face competition from women (and men) selling sex on the Internet, as Elizabeth Bernstein has found in her fascinating book about sexual commerce in San Francisco, Amsterdam and Stockholm (Temporarily Yours: Intimacy, Authenticity, and the Commerce of Sex, University of Chicago Press, 2007). Online, more than ever, we understand that sexuality is something created by culture – virtual desires rather than a natural, unchanging force.

Anna Clark is a professor of history at the University of Minnesota and author of The History of Sexuality in Europe (Routledge, 2011).