PERUSE any basic work of European history, you will learn that about 200 years ago, a new way of thinking, secular nationalism, began to replace religion as the main focus of people's public loyalties. To judge by the landslide vote for the Scottish National Party in yesterday's general election, that process may just have been completed in Scotland, a land with a long history of religious rivalry and conflict. Regardless of their metaphysical beliefs, it seems clear that Scottish Protestants, Catholics, Muslims and atheists have voted in unprecendented numbers for a party whose main aspirations are for a new earthly kingdom. Scottish people are no more religious, these days, than English people, if anything slightly less. The Scottish Social Attitudes Survey found that the number of people who identify with the national (Presbyterian) church had fallen to just over 20% in 2012 from 35% in 1999; while those who professed "no religion" had risen from 40% to 54%. But feelings of religious identity and sectarian rivalry (which is a euphemism for Protestant-Catholic tension) do persist; a survey also found that 88% of respondents thought sectarianism was still a problem although 47% thought it had got better in recent years. Some 72% of Scots Catholics said religion was "an important part of who they are" against 45% of Protestants. So the question of how religion affects voting patterns is still worth asking. Among Scottish Catholics, who account for about 16% of the population, there used to be a lingering fear that an independent Scotland would enhance the privileges of the Protestant church; but as Protestantism wanes, that fear has less reason to exist. These days, the proportion of Catholics supporting independence is higher than the share of Protestants who feel that way. But sociologists like Michael Rosie of Edinburgh University say the reason for this difference is demographic, not theological. The Catholic community has been more successful than the fast-ageing Presbyterian one at retaining the loyalties of young people; and young people are more likely to favour a sovereign Scotland. And several factors have pushed Catholics, whether practising or otherwise, in a more pro-independence direction. Scotland's Catholic bishops urged voters to select a party on two main criteria: those who took conservative positions on abortion and the family, and those who opposed renewing Britain's submarine-based nuclear deterrent, which is based in Scotland. Neither of the main parties, SNP or Labour, could offer much to Christians with conservative views on social issues: both parties have taken a liberal line on abortion and gay marriage, although both contain individuals with conservative Christian ideas. The Scottish Labour leader, Jim Murphy, is a Catholic but says he disagrees with his church on abortion.

On the other hand, for people with strong anti-nuclear views, whether Catholic-inspired or otherwise the SNP was the obvious choice; it had pledged to use its influence to stop any Labour government renewing the weapons. Opposition to nuclear arms is also strong among left-wing non-conformists, such as the Iona Community, a fraternity of radically-minded Christians whose base is a tiny island (pictured) on the Atlantic coast which was an early bastion of the faith.

Doug Gay, a radical Presbyterian thinker, said it was significant that no religious authority had, subliminally or openly, warned people against voting for the SNP. This left voters of all religous persuasions to come to their own judgement.

Meanwhile, a more sociological argument has been made by Tom Gallagher, a professor at Bradford University. Working-class Catholic men who have drifted away from the church are more likely to make radical or experimental political choices because neither religion or a sense of responsibility to the family is holding them back as it might have done in the past. And in some cases, "nationalism has become a comfort blanket for Catholics whose identity is no longer anchored in religious faith." The same may be true of Protestants who used to see national church or "kirk" as a mark of difference from England, but can now assert that difference in other ways.

The net result is to bring closer the prospect of an independent and more-or-less secuar Scotland (in the sense of having no established or state religion) albeit one whose flag will, for the foreseeable future, be an ancient religious symbol, a cross associated with Andrew, the "first-called" among the Christian disciples.