I DID something I have never done before on Sunday: I went to church. Now, of course, I’ve been to church for weddings and funerals and christenings but I have never been to a Sunday service in my life, to watch an act of worship.

I’ve been – excuse the pun – something of an evangelical atheist since before I was a teenager. I was influenced, I think, by growing up in Northern Ireland during the Troubles. The violence I saw around me I blamed squarely on religion, Protestant and Catholic. And, coming from a so-called “mixed marriage” (my mother a Catholic and my father a Protestant), I saw the bitterness, failings and hypocrisy within both of the dominant faiths in Northern Ireland.

I did, I confess, somewhat hate religion, although that sense of anger has abated over the years as the repressive role of religion has dwindled in an increasingly progressive society.

So, the latest Scottish Social Attitudes Survey intrigued me. The Church of Scotland – one of the most liberal emanations of Christianity in this country, together with the Episcopal Church –looked in dire trouble. Only 18 per cent of the Scottish population identifies as a member of the Kirk, the survey found – a 32% decline in just 15 years. One of the reasons suspected for the Kirk’s fall from grace, so to speak, is its socially liberal views, on issues such as same-sex marriage. It appears that many of those who still want Christianity in their lives in 2018 prefer their religion old-style, not tweaked by 21st century social values.

However, no-one should be naive enough to imagine that the Kirk, still the biggest Christian faith group in Scotland, has always been so forward-thinking. Like all major faiths, it has a past that shamed it. For evidence just look to the notorious 1923 report of the Kirk’s Church and Nation committee, On the Menace of the Irish Race to our Scottish Nationality. In 2002, the Kirk admitted it was guilty of bigotry and apologised.

For centuries, then, the Kirk has been a pillar of Scottish life; now, though, the pillar seems to have been shaken by Samson and about to fall. That’s why on Sunday, I walked to the quaint little parish church near my home on the south side of Glasgow to see what was happening to the faithful amid this crisis.

Now, I may not have gone to church throughout my life, but I am not ignorant of religion. I had read the bible cover to cover before I went to university and I have read it often since, believing it impossible to understand the Western culture we live in without an intimate knowledge of one of its founding texts. However, the rituals and rules of what goes on inside a church on a Sunday were a mystery to me.

What I saw in that church upset me, but not in the way you might think. I may have been a little uncomfortable with the prayers and the hymns and the hallelujahs but it was the sense of a rather decent and dwindling bunch of ordinary people struggling to keep a dying way of life on track that I found upsetting. I saw a part of history on its way out and that moved me in a way I did not think I was capable of being moved when it comes to religion.

Many fellow atheist may rub their hands in glee at the thought of a dominant religious force on the ropes – and I probably would have done the same for most of my life as well – but not any more.

The Kirk is akin to so much of the centre ground in modern life; it represents the ordinary, the decent, the everyday. But in this world of ours, the centre ground is being bombed to a wasteland by extremism: the thoughtful and quiet are shouted down, the thinkers ignored, the reasonable derided, the ordinary and decent forgotten and sidelined. And the Kirk that I saw on Sunday very much represented the ordinary and the decent.

When I walked into the church, I was greeted by almost every member of the small congregation of 40, including the minister, free from dog-collar and dressed in a civvy suit and tie. The sermon was as simple as this: go in peace, do no harm, and do good. I’m 48 and, until a young African family arrived, I was by far the youngest person in the congregation.

As I looked around at the grey hair and the walking frames, I couldn’t help but think that, in 10 years, there might be no-one here. The stained-glass windows would be boarded up. The church may be sold off to a pub developer or turned into fancy flats. The sense of decay had a quotidian poignancy to it as well: the church no longer had an organist, so the hymns were played from YouTube. The members of the young African family I mentioned were hugged and embraced and prayed over. They were soon to return to Malawi and the congregation showed genuine love and friendship for them.

Take the supernatural mumbo-jumbo out of this, I thought to myself, and who would be foolish enough not to see something truly human and kind – even necessary – about the events going on in that little church?

When was the last time you found yourself able to pause and think about what makes you a decent human being; or rather, if you will ever be a decent human being? How often do we hear the words love, peace, kindness, selflessness and charity in the same sentence?

Our world may not yet be one of perpetual greed, cruelty and selfishness, but it is edging close to that.

I did not think I would go to church on Sunday morning and come back mourning religion, an institution I have spent a lot of my life despising, but I did.

And I did so because of the human beings inside the institution, not the institution itself. I am sure those worshippers are just as flawed as every one of us – in fact, many of them admitted their hypocrisies tore at their hearts – but their words and deeds seemed to me tiny flames of decency in an increasingly dark world.

For this atheist, these may not be the flames that light my path through life, but I would prefer if they carried on quietly burning, guiding others who need it, and keeping a little of the black cruelty that so starkly dominates the world in which we live at bay.