Tim Farron delivers his speech to the Liberal Democrats' conferenceDave Radcliffe

As Tim Farron discovered last week, the claim to a liberal and progressive mantle sits somewhat uncomfortably with pronouncements of religious faith, especially where gay rights are concerned.

This is because – while he can believe whatever he likes about gay sex quietly and in private – he cannot stake a claim to the liberal Remain constituency if there is so much as a whiff of the homophobe about him. Farron simply cannot claim to be a liberal in today's Britain and openly be seen to hold anti-gay beliefs. His initial equivocation on the morality of gay sex is basically the same thing, at least as far as his public image is concerned. This is a toxic political misjudgement. The incompetency of Corbyn’s media operation should not lull Farron into a false sense of security on the need for a loud and affirmative stance on such social issues.

The Liberal Democrats’ rather floppy showing at the local elections is a clear indicator that Farron simply is not making a compelling enough case to the liberal Remain constituency he needs to attract. If Farron wants to change this he needs to make a stronger case for why he and his party are the voice of tolerant, Remainer Britain. Last week’s controversy was a massive hiccup.

"Religious talk from an insurgent politician seeking to be a political moderniser is best avoided or kept vague"

Previous political leaders have also become unstuck by trying to balance private faith and liberal, modern morality. Cameron and Blair started their careers as cautiously averse to public professions of faith. Alastair Campbell, Tony Blair's spin doctor, famously said, “we don’t do God”. Likewise, David Cameron’s early pronouncements were aimed at a sort of culturally-Christian-who-doesn’t-quite-make-it-to-church constituency. In 2008 he likened his faith to “the reception for Magic FM in the Chilterns: it sort of comes and goes.”

The message from both examples is pretty clear: religious talk from an insurgent politician seeking to be a political moderniser is best avoided or kept vague. This is a lesson Farron would do well to heed.

Later in their careers, Cameron and Blair both felt more comfortable talking about their faith. As the 2005 David Cameron who posed with huskies and loved the environment faded from view, a Prime Minister with an apparently bolstered faith grew in his place. In 2014 he announced himself to be 'evangelical' about his Christian faith.

"Margaret Thatcher had no qualms about quoting St Francis of Asisi on the steps of Downing Street in 1979"

Farron himself was clear that his beliefs are absolutely personal and not to be imposed on anyone else. His real failure lies in his ability not to realise the pitfalls of bringing it up in the first place, to not have considered the tricky position it would place him in as he desperately attempts to garner as many liberal votes as possible. He’s had nearly two years since the Lib Dem leadership election – when his stance on gay sex was first prominently brought up – to think of a good answer on this issue.

For the conservative right, a relationship to religion is more straightforward. Theresa May recently blasted the decision to drop ‘Easter’ from egg hunts to be “absolutely ridiculous”. Margaret Thatcher had no qualms about quoting St Francis of Asisi on the steps of Downing Street in 1979, or philosophising to Scottish church leaders in 1988. If Farron wants to differentiate himself, he needs to position himself as the opposite to such Tory moralising.

Given his recent difficulties, Farron should take Alastair Campbell’s advice: cut the God crap