A S RECENTLY AS the late 1980s, most Americans thought gay sex was not only immoral but also something that ought to be illegal. Yet by 2015, when the Supreme Court legalised same-sex marriage, there were only faint murmurs of protest. Today two-thirds of Americans support it, and even those who frown on it make no serious effort to criminalise it.

This surge in tolerance illustrates how fast public opinion can shift. The change occurred because two trends reinforced each other. First, many socially conservative old people have died, and their places in the polling samples have been taken by liberal millennials. In addition, people have changed their minds. Support for gay marriage has risen by some 30 percentage points within each generation since 2004, from 20% to 49% among those born in 1928-45 and from 45% to 78% among those born after 1980.

However, this shift in opinion makes gay marriage an exception among political issues. Since 1972 the University of Chicago has run a General Social Survey every year or two, which asks Americans their views on a wide range of topics. Over time, public opinion has grown more liberal. But this is mostly the result of generational replacement, not of changes of heart.

For example, in 1972, 42% of Americans said communist books should be banned from public libraries. Views varied widely by age: 55% of people born before 1928 (who were 45 or older at the time) supported a ban, compared with 37% of people aged 27-44 and just 25% of those 26 or younger. Today, only a quarter of Americans favour this policy. However, within each of these birth cohorts, views today are almost identical to those from 47 years ago. The change was caused entirely by the share of respondents born before 1928 falling from 49% to nil, and that of millennials—who were not born until at least 1981, and staunchly oppose such a ban—rising from zero to 36%.

Not every issue is as extreme as these two. But on six of the eight questions we examined—all save gay marriage and marijuana legalisation—demographic shifts accounted for a bigger share of overall movement in public opinion than changes in beliefs within cohorts. On average, their impact was about twice as large.

Social activists devote themselves to changing people’s views, and sometimes succeed. In general, however, battles for hearts and minds are won by grinding attrition more often than by rapid conquest. ■

Sources: General Social Survey; The Economist