Narrow proscribed worlds, like schools and church, full of rituals and language and things ordinary mortals almost understand, are the perfect places to set sitcoms. But you’d imagine churchy ones like Rev to be anathema to a chippy atheist, alert for all hidden messages and smug in-jokes and wary that if you played it backwards it might drag you into the light. How the trendies of the church will relish being in the joke not of the joke, I thought (same as I felt about Alan Yentob’s appearance on W1A). I imagined that watching Rev would be like dousing my joyless chips with a holy balsamic. I was wrong.

Rev finished its third series this week, and I think it’s gone from good to great. On the surface it is definitely a sitcom about a vicar. It has running jokes about him not getting his baby christened and one of the main storylines is about raising money to save his ailing church. As happens, over three series we’ve become more invested in Rev Adam Smallbone and the people around him; it’s become much more than a sitcom about a funny vicar, it’s become about humanity. (Do stop me if I ever get too pretentious.) But paradoxically, it’s also the first church-based sitcom to properly concern itself with matters deeply ecumenical. This is sublime sitcom for grown ups, atheist or not.

How do they do it? Well, Smallbone is complex – he’s not just his job. Yes, he’s a man with all the difficulties an individual might face working for the strangest corporation you could imagine, where the bosses wear bizarre outfits from earlier centuries and talk in obscure, deflecting ways almost incomprehensible to the untrained ear. In this series they’ve added the fatigue and tired desperation of a new parent. Plus personality and character traits like being riddled with longing, hope, optimism and inability to operate a spreadsheet. And he’s also plagued by an on-going nicotine addiction, ridiculous colleagues and parishioners with extreme needs and varied intentions.

Then they’re not afraid to play it biblical; that strange corporation is the Church of England, after all. The eponymous Rev is a man of God, and one betrayed by a kiss at that. In one extraordinary sequence, Smallbone treks the streets of east London with a cross on his shoulders, and there’s no attempt either to mock or be preachy. It is dark comedy, its own message resonating with the received symbolism of course; here was a man caught in the turmoil of his own mental anguish. It played out straight and heartfelt; filmic in its scope. And topped with what could have been a risk – the appearance, to the Rev, of God in a tracksuit and greasy beanie, grooving like an Special Brew-ed dad to “Lord of the Dance”.

That the writers can say something potentially contentious – he saw God and it was Liam Neeson! – with a tender touch is a hard act to pull off. It works because we trust them in deep water. They’ve turned situation into a strong story and made it complex, made it mean something, beyond funny. They’ve given us discussions about prayer, about forgiveness and redemption, tackled issues around convicted paedophiles and gay weddings. I mean, in a sitcom, right? And it’s nuanced – as when Smallbone struggles with what we thought were his most strongly-held convictions. In hindsight, his baby not being christened may have foreshadowed all this internal doubt, and we thought it was just a joke.

Yeah, it is funny. The writers are lucky that this particular corporation moves towards change so slowly it’s allowed them to appear very topical. They make jokes about Ottolenghi. They swear and lo, the swearing is rich and funny, and context gives it extra bite. There are bits of physical comedy, and great underplaying. And they play with our social expectations, taking us right in to the familiar warmth of good intentions and rubbish biscuits and then right out to the edges with homeless Colin and Jimmy, who constantly offers all sorts of favours, including sexual, at the vicarage door. Archdeacon Robert being mildly obsessed with telling the tale of being Alex’s unwitting birth partner in a taxi is a thing of beauty. (If you ever saw Simon McBurney in Théâtre de Complicité you’ll have no hesitation in calling him a genius.)

At the end of the penultimate episode of this series, Rev Smallbone’s inner conflict came to a head, and he quit. Without giving away too much, the final episode features a dog funeral, Colin in tears, everyone talking to God and Adam Smallbone coming completely unstuck in some kind of grief. This is not the stuff of comedy, by anyone’s rules. Given that it’s set at Easter, and that they’ve never shied away from religious parallels, you may imagine that “the worst vicar in the world” will rise again for series 4. But as they present that final tableau with all the main characters – Adam’s “crowd of lost, hopeless and annoying people” – gathered togther, you realise why the show works for anyone, religious or not. It’s because that crowd has become community, and being part of a community is something that we all seek.

So let us end today with a heartfelt prayer from Colin: “God bless Adam and his family, even though he’s a twat.”