In 1969, when the New York police raided the Stonewall Inn and encountered unexpected resistance from LGBT protesters, homosexuality was still criminalised in most countries. Even in more tolerant societies, venturing out of the closet was often akin to social and professional suicide. Today, in contrast, the prime minister of Serbia is openly lesbian and the prime minister of Ireland is proudly gay, as are the CEO of Apple and numerous other politicians, businesspeople, artists and scientists. In the United States, the average Republican today holds far more liberal views on LGBT issues than the average Democrat held in 1969. The argument has moved from “should the state imprison LGBT people?” to “should the state recognise same-sex marriage?” (and almost half of Republicans support same-sex marriage).

History rarely moves in a straight line. There's no reason to think LGBT liberation will inevitably spread around the world

That said, about 70 countries still criminalise homosexuality today. Saudi Arabia, Iran, Brunei and several more sentence gay people to death. Even the most gay-friendly societies are rife with discrimination, abuse and hate crimes. Moreover, the remarkable achievements of the past 50 years are no guarantee for the future. History rarely moves in a straight line. There is no reason to think that LGBT liberation will inevitably spread around the world, eventually reaching Saudi Arabia and Brunei. Indeed, violent homophobic backlashes are possible, even in the most liberal countries. Just last week the Guardian revealed shocking statistics that showed homophobic and transphobic hate crimes have doubled in the UK over the past five years.

As a historical analogy, consider the situation of Europe’s Jews in the 1920s and early 1930s. During that period, European Jews were liberated from centuries of discriminatory laws, and in many countries they had gained full legal, economic and political equality. Just as today the LGBT community takes pride in the prime ministers of Serbia and Ireland, so nearly a century ago Jews noted with satisfaction that the German foreign minister, Walther Rathenau, and the French prime minister, Léon Blum, were Jews. Just as today gay, lesbian and transgender people insist on the right to serve their countries in the military – as the ultimate marker of national integration – so during the first world war 100,000 Jews served loyally in the German army, and 12,000 lost their lives for the Fatherland.

Even the gay and lesbian people who today feel so sure of their position that they support far-right parties such as Germany’s AfD and Italy’s Lega have had their Jewish counterparts in interwar Europe. Mussolini’s fascist party at first distanced itself from antisemitism, and thousands of Jews supported Mussolini and even joined the fascist party. Mussolini’s lover was Jewish, as was his finance minister in the 1930s. We all know how that story ended. Blum barely survived Dachau, and the Jewish war veterans met the Jewish fascists in Auschwitz.

There are alarming signs that the era of LGBT liberation might also be followed by an era of unprecedented persecution. In particular, LGBT people might become the preferred targets for ultra-nationalist witch-hunts. In eastern Europe, for example, nationalist leaders who refrain from antisemitism due to the terrible memories of the Holocaust instead frighten the population with tales of a global gay conspiracy.

Facebook Twitter Pinterest Demonstration in the wake of the Stonewall Riots, early 1970s. Photograph: Leonard Fink/thegaycenter.org

In both Poland and Hungary, the governments routinely depict gay people as foreign agents and as a threat to the survival not only of the nation, but of western civilisation itself. These regimes even manage to link LGBT people to immigration, by arguing that the gay conspiracy hopes to decrease native birth rates in order to open the door to a flood of immigrants.

The Russian regime, too, claims that a worldwide homosexual conspiracy seeks to destroy the country. Official media has depicted both anti-government demonstrations in Russia and the 2013/14 Ukrainian revolution as the handiwork of the gay cabal, Timothy Snyder writes in The Road to Unfreedom. The media also present Russian LGBT people as traitors, arguing that homosexuality is alien to Russian traditions, so the mere fact that you are gay is proof that you must be a foreign agent. A poll conducted in May 2018 revealed that 63% of Russians are convinced that an organised, global gay network is indeed working to undermine Russia’s traditional spiritual values and thereby weaken the country.

To combat this alleged threat, in 2013 Russia passed a notorious law banning “gay propaganda”, which has led to the arrest and persecution of numerous people. In August 2018, a 16-year-old teenager, Maxim Neverov, was charged with the “crime” of uploading several pictures of guys hugging to the Russian social media platform Vkontakte. The high-school pupil was fined 50,000 roubles (£616) – more than the average monthly salary in Russia – before winning a court appeal against the decision.

Eastern Europe is hardly unique. Regimes and politicians in numerous countries, from Brazil to Uganda, spread tales about LGBT conspiracies, and promise to protect the nation from the queer menace. LGBT people are tempting targets for such witch-hunts for two main reasons. First, conservative authoritarian regimes usually bemoan the fluidity and complexity of reality, and promise a return to an imaginary golden age when boundaries were clear, identities were fixed, and people had little room for making personal choices. Back in those good old days, men were men, women were women, foreigners were enemies, and nobody had to think too much about all that complicated stuff. But LGBT people blur the boundaries, mix up identities, and force people to think and choose. No wonder autocrats hate them.

Second, LGBT people don’t have much power, so persecuting them is cheap. Throughout history, autocrats have often singled out a weak minority, made it look far more powerful and dangerous than it really was, and then promised to protect society against this non-existent threat. That was the case in the original witch-hunts in early modern Europe, which often targeted elderly women and lonely eccentrics. The same logic is now at work in such places as Russia – a country that suffers from many serious problems. Its economy is stagnating, corruption is endemic and public services are deteriorating. But fighting corruption means taking on the strongest men in Russia. It is far easier to forget about these headaches and instead protect innocent Russians from the corrupting tentacles of the global gay conspiracy. Just try to put a rouble value on all this. How many roubles would it cost to improve Russia’s dysfunctional healthcare system? How many roubles would it cost to protect Russia from the nonexistent global gay conspiracy?

Facebook Twitter Pinterest Illustration: Sébastien Thibault

¶

If LGBT people are increasingly the target of political witch-hunts, we are unlikely to see a return to the pre-Stonewall era of the closet. We might see something far worse. People will not be able to escape persecution by retreating back into the closet, because new technologies are breaking it apart. The combination of information technology and biotechnology is giving birth to new surveillance tools that will soon make it possible to monitor everybody all the time. For the first time in history any regime that so desires will be able to spy on all citizens 24 hours a day, and to know not only what they are doing, but even how they are feeling.

If a future homophobic regime wants to round up all the gay men in a country (as authorities in the Russian province of Chechnya have recently sought to do), it might start by trying to hack the databases of gay dating sites such as Grindr. The Egyptian police, for example, have already used Grindr data to track and arrest gay men by posing as users of the site (Grindr warned users that people may be posing on its site in order to obtain their information). Another option is to use an algorithm to go through someone’s entire online history – the YouTube clips they watched, the headlines they clicked, the photos they uploaded to Facebook.

In August 2018, it was revealed that evangelical Christian groups offering “conversion therapies” to youths used Facebook’s algorithms to target vulnerable teenagers with their adverts (Facebook later removed these adverts saying they were contrary to its policies). The teens did not necessarily identify as LGBT. It was enough for them to show an interest in LGBT-related items – for example “liking” an LGBT-related story – to become a target. Israeli security forces have also been known to use various methods – including online surveillance – to identify gay Palestinians, but not in order to “convert” them. Rather, gay Palestinians are blackmailed to become Israeli informers. Since homophobia is widespread in Palestinian society and, at least in Gaza, homosexuality is still criminalised, blackmailing closeted gay people is one of the easier ways to acquire informants. In a vicious circle, Hamas then doubles its efforts to expose and persecute gay Palestinians, assuming that they pose a security risk (which is really the fault of Hamas’s own homophobia).

In 2016 the Chinese firm Kunlun bought Grindr, but in March 2019 the US government’s Committee on Foreign Investment in the United States informed Kunlun that its ownership of Grindr “constitutes a national security risk”. Kunlun is now forced to sell Grindr by 2020. There was no explanation given for why Chinese ownership of a gay dating site constitutes a national security risk, but I trust that by now you can answer that question yourself.

Facebook Twitter Pinterest Police detain a gay rights activist during the May Day demonstration in Saint Petersburg, in 2016. Photograph: NurPhoto via Getty Images

On 14 July 2017, several Russian cabinet members including prime minister Dmitry Medvedev gathered for a talk by a Stanford professor who has studied the extent to which people’s personality traits can be revealed by analysing their online activity. At the time, the professor was working on proving the ability of algorithms to detect whether a man is gay or straight with an accuracy of 91%, based solely on analysing a few facial pictures. While the professor himself was doing so in order to alert the public to the danger such technology poses for individual privacy, the Russian officials were probably more interested in learning how to use the technology than how to protect people’s rights.

Even if you have never had a Grindr account, never watched gay porn online and never clicked on LGBT-related news items, in the not too distant future merely allowing your eyes to roam freely could cost you your liberty. Shoshana Zuboff’s The Age of Surveillance Capitalism describes how corporations are developing ever more sophisticated tools to know what their customers like. For example, if you watch a television series, the producers want to know which characters or scenes most engage your attention, in order to make future episodes even more addictive. To ask viewers for their opinions is a cumbersome and untrustworthy method. It is much better to directly track involuntary biometric signals such as eye movement and blood pressure. Tracking such signals might tell the network, for example, that 63% of viewers connect to a minor character, so it would be a good idea to expand their role.

Exactly the same technology could also tell the future gender police that you are a secret “gender traitor”. If the biometric sensors incorporated into the TV discover that a man watching the kiss scene in Game of Thrones between Jon Snow and Daenerys Targaryen focuses his gaze on the macho hero more than on the Mother of Dragons – the gender police might knock on his door at 2am next morning to look further into the matter.

Facebook Twitter Pinterest An anti-Jair Bolsonaro protester in São Paulo. Photograph: NurPhoto via Getty Images

If you think of protecting yourself by not watching any television, not surfing the internet and flushing your smartphone down the toilet, what will you do when cameras are placed on every street corner and sensors constantly scrutinise how people behave in coffeeshops or in school? In 2013 Iranian authorities ordered cafe owners to install cameras and turn over the footage on demand. In March 2019, the Guangdong Guangya high school in China reportedly purchased 3,500 biometric bracelets to monitor students’ physical activities, heart rates and the number of times they raised their hands in class. By cross-referencing data-points, future schools might be able to tell not only who fell asleep during maths class, but also who fell in love with the maths teacher.

Now multiply this thought experiment by several millions. In recent years China has turned its Xinjiang province into the world’s largest surveillance laboratory. In an alleged attempt to stamp out “Islamic extremism”, Chinese authorities are constantly monitoring millions of local Muslims. People are forced to give samples of their DNA, blood, fingerprints, voice recordings and face scans. These markers then allow the government to track personal activities with the help of a countrywide network of CCTV cameras, handheld devices, facial recognition software and machine-learning algorithms. Sensors are placed everywhere – from markets to mosques. When the algorithms recognise a suspected pattern of behaviour – perhaps using religious speech, wearing traditional Islamic clothes, or visiting a mosque too frequently – the “offender” might be warned by the police or sent to a “re-education” camp. Hundreds of thousands of people have reportedly been sent to such camps.

LGBT people are particularly vulnerable to surveillance as they have benefited so much from new online social opportunities

At present, this surveillance regime is aimed against the Muslim minority in Xinjiang, but it can easily target any other group that gets in the regime’s crosshairs. What might happen, for example, if the people in charge of China’s burgeoning social credit system decide that having a same-sex love affair is an antisocial behaviour that should detract from your social credit – and therefore from your ability to enter prestigious colleges, get a mortgage, or buy a plane ticket?

Xinjiang sounds like a far-off place, but we are living in a global world. Agents of various regimes are flocking to Xinjiang these days to learn the methods and buy the technology. The combination of revolutionary technologies with conservative ideologies could well lead to the creation of the most totalitarian regimes in history.

Technology is not inherently bad, of course. I met my husband 17 years ago on one of the first online gay dating sites, and I am deeply grateful to the engineers and entrepreneurs who developed that site. Living in a small conservative Israeli town, the only place to meet guys was online. LGBT people are particularly vulnerable to online surveillance precisely because they have benefited so much from the new online social opportunities. Therefore my message is not that we should all go offline and stop all further technological progress. Rather, the message is that technology makes the political stakes higher than ever.

In the 20th century, people used similar technologies to build very different political regimes. Some countries used radio, electricity and trains to create totalitarian dictatorships – other countries used these inventions to foster liberal democracies. In the 21st century we could use information technology and biotechnology to build either paradise or hell, depending on our political ideals.

Facebook Twitter Pinterest LGBT pride in Strasbourg on June 15, 2019 Photograph: Frederick Florin/AFP/Getty Images

Nothing has been determined yet, and however gloomy the future may seem to some of us, in 1969 the future looked ever gloomier. In the end, most of the dystopian scenarios that frightened people in 1969 did not materialise, because many people struggled to prevent them. If you wish to prevent the dystopian scenarios of the 21st century, there are many things you can do. But the most important thing is to join an organisation. Cooperation is what makes humans powerful. Cooperation is what the Stonewall riots were all about. They were the moment when a lot of individual suffering crystallised into a collective movement. Until Stonewall, LGBT people conducted isolated survival struggles against a terribly unjust system. After Stonewall, enough people organised together to change the system itself.

The lesson of Stonewall is as true today as it was in 1969, and is relevant to all humans, not just to those who identify as LGBT. Fifty people working together as members of an organisation can accomplish far more than 500 individuals. Technology now poses the greatest challenges in our history. To cope well with these challenges, we need to organise. I cannot tell you which organisation to join – there are many good options – but please do it soon. Do it this week. Don’t sit at home and complain. It is time to act •

• This article was revised on 27 June 2019 by the author, at his request, to clarify an aspect of the section on surveillance and online activity.