WHEN politicians in Washington state debated gay rights in the 1990s, recalls Ed Murray, a state senator, Republican legislators would ensure that teenagers on work-experience schemes were removed from the chamber for fear that their innocent minds would be corrupted. But earlier this year, he says, when the legislature passed a same-sex marriage bill, “every intern wanted their picture taken with me.”

As Mr Murray’s flirtation with celebrity suggests, America has come a long way. Six states (and Washington, DC) allow gays to marry. Yet Washington is not one of them, for, as Mr Murray and his allies had expected, soon after the marriage law was passed its opponents secured enough signatures to place a repeal measure on the November ballot. The law is on hold until then.

If history is any guide, the odds should be stacked against advocates of same-sex marriage in Washington and the three other states (Maine, Maryland and Minnesota) that will vote on the issue in November. Thirty-four such votes have taken place since 1998; 33 of them have been won by those who believe marriage must be the preserve of heterosexual couples. (The exception, a vote in Arizona in 2006, was overturned by voters two years later.)

That losing streak may well come to an end on November 6th. This is partly because all four states holding same-sex marriage votes are, to varying degrees, fertile ground for gay-marriage campaigners. Washington, for example, has a tradition of hands-off libertarianism and a low churchgoing rate. But more important is the speed at which attitudes are changing. A growing number of polls reveal majorities of Americans for same-sex marriage. Just three years ago Gallup found opponents winning by a 17-point margin.

Moreover, slice the data any way you like and you find the same result: men, women; whites, non-whites; Republicans, Democrats; Protestants, Catholics—all are moving in a liberal direction. (This is not the case for other “social issues” such as abortion or gun rights.) Perhaps most important, 63% of adults born after 1981 support gay marriage, up from 51% in 2009.

Opponents of same-sex marriage say that polls fluctuate, and that questions are badly worded. “I totally reject this myth of inevitability,” says Brian Brown, president of the National Organisation for Marriage, a campaign group. Mr Brown’s opponents are ahead in polls in three of the four states that vote in November (Minnesota is too close to call), but he points out, accurately, that polling usually overstates the other side’s case. In the most hotly contested vote yet, in California in 2008, hardly any polls predicted that Proposition 8, which barred same-sex marriage, would be upheld at the ballot box. (It has since been declared unconstitutional in court; the case is likely to reach the Supreme Court.)

Might something similar happen this year? The anti-gay-marriage campaign will step up its efforts as election day approaches, with a blitz of advertising. One effective ad it ran in the California campaign featured a little girl happily telling her mother that she had learned in school that she was allowed to marry a princess. Frank Schubert, who ran the California campaign and who is managing all four this year, says he is “cautiously optimistic” of winning them all, though he adds that with four simultaneous campaigns, the amount of national money that can be tapped for each is limited. He thinks the hardest state to win will be Maine, followed by Washington.

Campaigners for same-sex marriage fear Mr Schubert. But since the California campaign, which they acknowledge was badly run, they have honed their tactics. At the bustling Seattle headquarters of Washington United for Marriage, which is organising the effort to preserve same-sex marriage, Zach Silk, the young campaign director, explains that the earnest young volunteers around him are trained to tell voters “powerful human stories about people’s desire to show commitment, to prove their love.” Previous campaigns often used the more abstract, and less persuasive, language of civil rights.

The issue is moving national politics, too. In May, after a long evolution, Barack Obama declared his support for gay marriage. Democratic leaders have approved a gay-marriage measure for their party platform this year. Mr Brown thinks this decision will cost them at least one state in the presidential election, although polls suggest the issue is not a priority for voters.

It is impossible to predict what blend of elections, legislation and judicial decisions will bring gay marriage to America. But the opinion trends are clear, and victories at the ballot box in November would tip the balance further.