What does it mean to be British? For most of the 18th and 19th centuries - even to some extent into the 20th - there was a clear answer. To be British was to be Protestant. It was to read the King James Bible and Pilgrim's Progress, to share in a national myth of a heroic people, almost a new Israel, set apart and protected by God, and it was to not be Catholic. Protestantism linked grand English cathedrals, plain Calvinist kirks and ecstatic Welsh chapels. For most British people, Protestantism provided shared language, hymns and cultural references, while Catholicism provided a shared enemy, otherwise known as The French.
As Linda Colley argued in her classic study Britons, protestantism was "the foundation that made the invention of Great Britain possible."
There never was a single Church of Britain. Attempts by 17th century monarchs to impose a uniform type of Protestant Christianity in England and Scotland failed. The two established churches remained distinct in organisation, in culture and to some extent in doctrine. Even within England, the Anglican church always had to compete with a multitude of dissenting sects: Puritans, Quakers and Baptists in the 17th century, Methodists (who went on to dominate religion in Wales and much of Northern England) in the 18th. And, of course, there were always competing strands of practice and belief within the Church of England itself.
Yet this diversity was itself distinctively Protestant. Even Anglo-Catholics, who convinced themselves that the Church of England was not, in fact, protestant at all, preferred to stay and argue for their position as a minority within the established church rather than follow their own logic and submit themselves to the "foreign" jurisdiction of the Pope. For the British, Protestantism was always as much an expression of national identity as it was one of religious belief.
These days relatively few people in the UK, whatever their religious affiliations, feel much attachment to this style of Protestant identity, or if they do it is one of nostalgia rather than of belief. It's no accident that some of the strongest supporters of the King James Bible are atheists like Richard Dawkins or the late Christopher Hitchens. As for anti-Catholicism, that is going out of fashion even in Northern Ireland. Indeed, the fierce attachment of Ulster unionists to traditional expressions of Protestant British identity have long been a source of bemusement and embarrassment on the mainland. That version of Britishness now seems frankly un-British to most Brits, whose remaining anti-Catholic instincts are sated by laughing at some papal pronouncement on birth control or observing the (let's face, it, deserved) predicament of the Catholic Church in Ireland.
Modern Britain is, of course, secular (indeed irreligious) in tone and institutionally committed to embracing many different faiths. Indeed, Catholic Emancipation in 1829, when most of the laws discriminating against Catholics were done away with, can be seen as the first of many steps away from a Protestant society and towards a multi-faith one. Only a bare majority of the population now describe themselves as Christian; increasingly "None" has begun to replace "C of E" as the default option of the unsure when asked about their religious affiliation. Millions of us no longer know the words to once-familiar hymns or have more than the basic knowledge of Christian doctrines. It's unlikely that Michael Gove's generous gift of a King James Bible to every school in the land will do much to stem the tide of apathy.
How has all this affected the established churches, and in particular the Church of England? In some ways, the Church has managed the transition with remarkable success. Its churches are still popular venues for weddings and its clergy continue to officiate at the majority of funerals. A third of England's state schools are faith schools, the vast majority of them either Anglican or Roman Catholic. There are still bishops in the House of Lords. Anglican services still form the heart of many national events, as shown recently during the Diamond Jubilee. The Church has shown itself to be adaptable and at times ruthless in defence of its considerable social and constitutional privileges. And there's no doubt that its image of woolly, good-natured, slightly shambolic harmlessness has been central to its success in retaining the affection of a large proportion of the religiously uninterested population. The modern Church of Scotland, too, is these days much less dourly Protestant than it reputation south of the border would suggest, or than John Knox would have approved of.
In particular, the Church of England has cannily positioned itself as the linchpin of a multi-faith society, presenting for example its bishops in the House of Lords as spokesmen for religion in general rather than for Christianity in particular. This has, of course, involved a considerable rewriting of history. The Queen, for example, suggested in a speech made at Lambeth Palace  in February that "gently and assuredly, the Church of England has created an environment for other faith communities and indeed people of no faith to live freely." It's true that Anglicanism has always been something of a fudge, of course, but Her Maj rather overlooked the fact that in previous centuries, the Church fought hard to preserve its monopolies against Catholics and even against Protestant dissenters. Times have changed, however, and the Church of England, as usual, has changed with them.
Has it, though, changed enough? There are dangers for the Church in embracing an enhanced multi-faith role in a society in which strong religious commitment is waning. By speaking out on behalf of faith, forming alliances with other churches and religious groups, it risks losing that comforting and liberal image that has, until now, made it a source of national unity rather than division. It risks losing that vague connection with the people without which it ceases to be in any proper sense a national church and becoming once more a bastion of religious conservatism and even prejudice.
By coming out so strongly against same-sex marriage, for example, the Church leadership has made itself look to many people out of touch and divisive, including to many of its natural supporters, including to many of its practising members and even clergy. It's hard to believe that the C of E has much of a future as the Daily Mail at prayer.