When I was made the paper's religious affairs correspondent by the editor in early 2000, on my return from a five year posting as the paper's European affairs editor in Brussels, I accepted the job reluctantly, as a demotion.

Stupidly, I could not see the job as much of a story for a paper like the Guardian. I retained vestiges of my religious upbringing, as a Roman Catholic, but for various reasons, I had become largely unobservant – unlike my wife, a charismatic evangelical Anglican, and my children, being brought up in the evangelical tradition in defiance of Catholic teaching, because my wife is more devout than I am.

I am the son and grandson of mixed marriages and could remember my father going off to his church services in the local parish church (and yet still being a good man) while my mother dragged me and my brother and sister off to mass, where we could pray for the conversion of our "separated brethren", such as my dad and the reconversion of England, which was clearly what God and the Virgin Mary, who saw the country as her dowry, would want.

The sense of a separate, slightly beleaguered and isolated identity was even a little thrilling back in the late 1960s, especially as I was taken out of prayers at my (Anglican) grammar school for a period until the notion of contamination by heresy came to seem too absurd and I fell in with all the rest.

Even our church services were virtually identical, as my father pointed out when he attended mass occasionally. My mother though was markedly less keen about attending Anglican services and after she died when I was 28, my faith started dying too. My resentment about the Catholic church's authoritarianism grew and my attendance dropped off.

The church didn't seem to have much to say about why a good woman like my mother should die a long, lingering, horrible death from cancer, or why it should subsequently hound into outer darkness the able and deeply caring parish priest, who had ministered devotedly to her, because he wanted to get married, to a former nun, as it happened.

But still, sneakingly, when I took the editor's offer, I hoped my faith would return and I could appreciate the old belief. I was nervous of my lack of theological training, but at least I knew the British faith background and traditions and the Bible stories – I was quite shocked to discover that many of my colleagues on the paper did not have even a folk-memory of those. "What's a cardinal?" one senior desk editor asked as I attempted to explain a story. "Who was Noah?" an equally venerable colleague was asked when he told the desk about an archaeological dig at Mount Ararat.

My problem was, if everyone in religion was as ecumenical as I thought, I just could not see the story, or how to get it consistently in the paper. I soon learned how wrong I was: religious differences were as marked as ever.

The thing that astounded me was the vituperation directed not at other faiths (a degree of Islamophobia came later) but at those who happened to disagree within the same faith communities.

You get evangelical publications denouncing "liberals" within the Church of England and claiming they are not really Christian, there are reactionary Catholic publications sneering similarly at modernists and attacking those who do not wish for a return of the Latin mass as somehow lesser beings. Attitudes which might otherwise seem quaint, dated or toxic are given free rein: by and large churches have moved on from regarding black people as inferior (though I did come across one British theologian writing that conservative Anglicans might have to choose a black bishop "even if he does look like the janitor" over a gay-supporting white one) but as we know quite antidiluvian attitudes towards gay people and women still prevail, with an air of horrible self-righteousness and hypocrisy in some quarters.

What rankled most was the hypocrisy, the fact that the Bible's scattered and random words on homosexuality were uncontestable for all time and yet, somehow, divorce – which Jesus himself appears from the Gospels to have condemned – was somehow only a minor and changeable transgression. The fact that some of the evangelicals, such as Andrew Carey, journalist son of the former archbishop of Canterbury and one of the loudest and most sanctimonious cheerleaders against gay people holding positions in the church, is himself divorced and remarried (by his father) just added to my distaste. The immortal words of former president Richard Nixon (and the Simpsons' Reverend Lovejoy) come to mind: if the president says it's legal, it's not a crime.

That's just the Anglicans. Other Protestant sects are even worse: my prize for malignity going to the Jehovah's Witnesses, whose leadership denies followers blood transfusions even in medical emergencies, on pain of being cut off from all fellowship even with relatives, because of some bizarre misreading of a solitary obscure Biblical text written in an age long before transfusions were possible. Of course, the Watchtower leadership in Brooklyn do not deny transfusions to themselves; they just don't boast about it.

Don't get me started on Catholicism. A South American bishop was recently censured for excommunicating the medical staff who had carried out an abortion on a nine year-old child to save her life after she had been raped by her father, but the fact that he saw nothing wrong with his decision – he also excommunicated the child's mother, though not her father – is a dazzling revelation of church attitudes that are all too common.

This is a dessicated lack of humanity and compassion and, if the church holds it, I am afraid I just can't agree, so I cannot return to mass. The evidence is that many other cradle Catholics share my view. The church can well say it does not modify its views to circumstance, but we are equally at liberty to say that we walk away in the face of such heartlessness.

I gave up covering religion for the paper after seven years, partly because I felt I could no longer report dispassionately on such events, or even give a fair shake to those whose views seemed to me to be both deluded and malign.

"You mustn't judge the church by some of the people within it," my friend Jeffrey John, the dean of St Albans and the man forced to resign as bishop of Reading because he was gay and politely challenged the church's position on homosexuality, told me when I gave up. It's true: I met many inspirational and noble figures and the Dawkinsite idea – shared by many responders on this site – that all religious believers are stupid, or deluded, or malign, is very far from the truth.

Of them all I'd pick out Sister Helen Prejean, the Louisiana nun who befriends and comforts condemned prisoners and accompanies them even to the death chamber, showing love and compassion and companionship into their last moments, so that they are not alone. She's small and middle-aged and dumpy – physically not at all like Susan Sarandon, who portrayed her in the movie Dead Man Walking – but her life is a vivid demonstration of Christian belief in action. She'd still be a good woman if she didn't believe; she might even do the same thing in her life, but it is undeniable that her faith informs and gives her the rationale for what she does.

A few weeks ago I was in hospital. The only visitors I received who were not relatives were Christian ones: five in all, including two Catholic priests. None of them tried to convert me – and I didn't stop the evangelical layman who asked if he could say a prayer over me – but I appreciated their brief visits even though I told them I was no longer a believer. They were performing a charitable act, unselfishly and compassionately.

I didn't get any hospital visits from atheist visitors. What might they have said to me: "This is as good as it gets, mate?" The fact that I am edging towards their camp – I guess I am at the agnostic stage – does not exactly cheer me. It just makes me sad.