FOR the first time in America, three states voted on November 6th to allow gay couples to wed—ending a succession of electoral defeats for the measure in 32 states. A fourth state rejected a proposed ban. In Catholic France the new Socialist government has just approved a bill to permit same-sex marriage. New Zealand is preparing to pass similar legislation next year. Governments in England and Scotland have also pledged to do so soon. And in Spain a gay-marriage law passed seven years ago has finally been given a seal of approval by the Constitutional Court.

Just a dozen years after the Netherlands became the world’s first country to legalise gay nuptials, the global trend toward giving homosexuals full marriage rights seems to have gained unstoppable momentum. Same-sex marriage is now legal nationwide in 11 countries (see map), including Argentina and South Africa, as well as in parts of a further two. In Mexico it is allowed in the capital. In America nine states along with the capital have legalised it, mostly as a result of court challenges.

That said, in 78 countries—mostly in the Muslim world, Africa and other developing states—gay sex is still a crime, punishable by long prison terms and even death. Opposition against gay marriage remains fierce, particularly from churches, conservatives and some politicians. Rick Santorum, a former Republican presidential candidate, has described the legalisation of gay marriage as “a turning-point in American history”, saying it would do more to destroy the church and the family than any other movement. Others have gone further, talking of a “slippery slope” leading to a generalised acceptance of incest, bestiality, paedophilia and other horrors.

But attitudes are changing—and fast. Fifty years ago homosexuality itself was still a crime throughout most of the world. Britain decriminalised it only in 1967 and it was not until 2003 that America’s Supreme Court struck down the remaining sodomy laws in 14 states. Now, across most of the West, polls show a majority of public opinion in favour of equality for gays, including allowing them to marry and adopt children. Ten years ago two-thirds of Americans were opposed to gay marriage; now more than half, including most Catholics, are in favour. Similar trends can be seen in other Western countries.

As attitudes have shifted, laws have changed. When Denmark became the first country to allow “registered partnerships” for gays, in 1989, it was seen as revolutionary. Now most Western countries allow some kind of “civil union” giving homosexuals most of, if not all, the same rights as married straight couples or else full-blown marriage, with the former usually preceding the latter. Why this rapid shift, which has taken even many activists by surprise? It is partly generational. Younger people, brought up in a more tolerant age, simply cannot understand what all the fuss is about. But it is also a result of changing behaviour among gays themselves. As homophobic laws have fallen, so more homosexuals have come out. And as their straight neighbours see them leading normal happy family lives—including bringing up children—without the world falling apart, they become more widely accepted. Lesbian, gay, bisexual and transgender (LGBT) activists have also changed their tactics, getting better organised, raising funds, and going out to educate people. In this month’s elections in America the gay-rights movement spent $33m promoting gay marriage in the four states where it was on the ballot—three times the amount their opponents were able to drum up, and a complete reversal of the situation in the 2008 elections. At the same time, the churches, most of which regard gay sex as a sin, are losing some of their influence. A recent survey of Americans’ religious beliefs by the Pew Research Centre showed one in five adults saying they had no religious affiliation—double the proportion 20 years ago. Three-quarters of these so-called “Nones” support gay marriage. In another study, 42% of Britons described themselves as atheists or agnostics—three times as many as in the early 1960s. In France only 7% of Catholics continue to attend mass at least once a week; 58%, including three-quarters of those aged under 35, never go.

In America, where Barack Obama recently became the first president to endorse gay marriage, Gene Robinson, the Anglican Church’s first openly gay bishop, talks of a “sea change” taking place. The 1996 federal Defence of Marriage Act (DOMA), restricting marriage to the union between a man and woman, has increasingly been coming under legal challenge, with two federal appeals courts holding it to be unconstitutional. On November 30th the Supreme Court may take up one of several gay-marriage cases before it. If, as activists hope, it decides in their favour, the ruling could prove as much of a watershed for gay-rights as the court’s landmark sodomy decision in 2003.

Whatever happens, activists will push on. They have never been happy with being fobbed off with civil unions. Like most straight couples, they want the stability, security and dignity brought by marriage. As Jonathan Rauch, a gay American author wrote in his book on gay wedlock, the essence of marriage is not sex or children or even self-fulfilment, but rather a lifelong commitment, recognised and supported by society, by two people to “have and to hold…for better for worse…till death us do part.” Not all gay couples will want to marry, anymore than all straight couples do, but they do at least want the option.