There are a lot of exaggerations in the 2018 film The Favourite, but one part that’s true to life is that Sarah Churchill really did threaten to blackmail Queen Anne with letters suggesting the two were more than just friends. It’s a rare example of an 18th-century woman blackmailing another over a supposed same-sex relationship during an era when that was mostly a man’s game.

Long before tabloids threatened to release intimate photos of billionaires, British men began sexually blackmailing each other with accusations of sodomy. The accusation didn’t just threaten social stigma; the punishment for attempted sodomy was years in prison, and the punishment for proven sodomy was death.

Despite the consequences, there were quite a few men sleeping with men in early 18th-century London. Some solicited sex on the street from male soldiers working as prostitutes. It was around this time that soldiers began to blackmail wealthy clients, but also men they simply thought would pay rather than have to face a charge of sodomy, however unfounded. Sometimes, a soldier would accost a random person on the street and say if that he didn’t pay him, the soldier would swear to the magistrate that he was a sodomite, says Randolph Trumbach, a history professor at Baruch College—City University of New York.

“A man in these years therefore stood about as good a chance of being blackmailed for sodomy as of being charged with actually committing the act,” Trumbach writes in “Blackmail for Sodomy in Eighteenth-Century London,” after reviewing court indictments from the years 1752 to 1759.

Alexander Hamilton
Buyenlarge/Getty Images
Alexander Hamilton.

Sexual blackmail over sodomy wasn’t a trend in Britain’s American colonies, which would soon separate into the United States. The U.S. puritanical culture was more concerned with adultery and interracial sex between men and women, and Americans blackmailed each other over these acts instead. In the 1790s, for example, James Reynolds blackmailed Alexander Hamilton for having an affair with Reynolds’ wife. Hamilton did pay Reynolds, but he later published the details of his affair in order to get Reynolds off his back (this strategy backfired).

Soldiers in 18th century London might blackmail someone only one time, but they could also keep going back to that person, demanding more and more money. Some men continued to pay, but some rebelled by dragging their blackmailer before the magistrate to get him in trouble. These stories ended up in the newspapers, and after a while, magistrates began to treat sexual blackmail as a form of robbery.

READ MORE: The Tragic Love Stories Behind the Supreme Court's Landmark Same-Sex Marriage Rulings

Laws against sodomy dated to the 16th century in Britain, so why did soldiers suddenly start exploiting them for money in the 18th? According to scholar Angus McLaren, it had to do with a shift in gender expectations.

“[A] new, middle-class model of domestic heterosexuality emerged, and Englishmen became increasingly concerned with maintaining a reputation of being attracted only to women,” he writes in Sexual Blackmail: A Modern History. “Historians have attributed this new sensitivity to the decline of an older sexual culture in which same-sex passions had not been as negatively viewed.”

In other words, the British were starting to understand men who had sex with men as a separate class of men, different from those who had sex with women. Though the word “homosexual” would not be coined until the late 19th century, men who slept with men in the early 17th century began to develop their own subculture, and certain parks became designated places where they could meet for sex.

As laws, social mores and technology changed, so too did the sexual behaviors people blackmailed each other for. Still, blackmailing men for having sex with other men didn’t go away in either the United States or the United Kingdom.

It became prevalent again in the 1950s and ‘60s, when a new gay identity and subculture was emerging for men. Sex between men was still illegal and carried a significant social stigma; during the Lavender Scare, the United States government purged some 10,000 employees suspected of being gay. Police in both Britain and the United States blackmailed gay men during this period. According to one London cop, police in the 1950s “looked on homosexuals as a source of extra income.”