If religions are born, they must also be able to die. How does this happen? I think we can discount at once the idea that it happens because people realise that science is better. It's obvious that the more people try to replace religion with science, the more they reproduce the worst features of organised religion.

On the other hand, societies might be reconfigured in such a way that the idea of religion made no sense. Interestingly, the reverse process seems to have happened in Japan in the 19th century, after American gunboats broke the country's isolation. According to a recent book from Chicago University Press, there had been until then no concept of "religion" in Japanese society; afterwards, as part of the modernisation, some social practices and beliefs had to be carved out as "religious" while others were classified as "non-religious". I don't know how this account might apply to the spread of Christianity in the 17th century, and then the murderous suppression over generations; I'll have to wait for the book to arrive. But the process seems a plausible one, and something like it may be under way in the "secularising" parts of the world today.

But what is happening there is less of an abandonment of doctrine as a withdrawal of assent from things formerly considered sacred. This is a process as general and impersonal as language change. Nor is it any more driven by rationality. Considered in themselves, there is nothing more "religious" about a teddy bear left out in the rain by the roadside than there is about a man wearing a white lace-trimmed frock. Yet the teddy bear at the site of a road crash is recognised as a meaningful symbol of our horror at mortality, while the young man in a cotta is no longer a priest linking us to the heart of our civilisation but callow and pretentious.

One hundred years ago, the situation would have been completely absurd, a reversal of the natural order of the universe. It's certainly impossible to describe it as progress. It is simply change – evolution, if you like.

Perhaps it is easier to think in terms of gods dying, rather than religions. And if we were to classify religions as involving different forms of worship, then you could certainly think that the extinction of worship towards a particular deity would count as the extinction of that religion. Certainly we can be sure that the religion of the Aztecs is dead with their gods, along with hundreds of thousands of others we can no longer reconstruct, and all the pre-literate ones whose existence we remain quite unaware of. Robert Bellah has a nice passage on this "Perhaps the end of Mesopotamian Civilization was marked, not by the last cuneiform document to be produced, but by the last prayer to be uttered to Marduk or Assur, but of that we have no record."

A slightly less scholarly approach is found in Terry Pratchett's Small Gods, where there is a desert full of shrivelled starving deities who will vanish altogether if they cannot find someone to believe in them. I once preached a kind of anti-sermon based on that book to a shocked evangelical congregation in an Oxford college. In any case, the Gods here are kept alive entirely by the fervency and numbers of their believers. Pratchett, being a child of English Anglicanism, underestimates the importance of ritual and overestimates belief, but it does seem clear that deities die when no one prays to them. That's something subtly but importantly different to believing in them. There is a sense in which I can believe in Thor without this for a moment meaning what it would to a believer. So blasphemy can kill off deities, and the measure of its success is that it comes not to be blasphemous at all.

But there is another threat to organised and literate religions, which they certainly treat as potentially fatal. That's heresy: wrong belief and a misapplication of the sacred. In this context one of the most interesting texts is CS Lewis's denunciation of female priests. They would, he said, constitute a new religion. Yet, when they came, we can see that they appeared as a simple inevitable, development of the old one. They are still priests. And it is this fact which illustrates better than anything the living and evolutionary nature of religions of all sorts. There could no more be a first Christian than there could be a first homo sapiens. We can see religions have been born, and have died, but the moments of birth and death will always be mysterious and shrouded.