TIM Farron has claimed he decided to quit as UK Liberal Democrat leader well before the election after facing repeated questions about whether he thought gay sex was a sin.

A devout Christian, Mr Farron announced his departure on June 14 saying his faith had made him a “subject of suspicion” and become an obstacle to him doing his job.

At the time, Mr Farron appeared to have been the subject of an internal coup, prompted by the resignation of the party’s openly gay home affairs spokesman Lord Paddick.

He quit citing “concerns about the leader’s views on various issues”.

However Mr Farron has now said the decision was made a month before, after intense media scrutiny of his socially conservative views on gay rights and abortion.

He admitted he was “torn” between his religion and leading a “progressive liberal party”.

He told Emma Barnett on 5 Live Daily: "I made the decision about two weeks into the election campaign. I thought there isn't a way forward out of this without me either compromising or just causing damage to the party in the long run.

"In which case I cannot see a way I will continue to be leader into the future.”

He had then put that thought “into a drawer” and kept it to himself through the campaign.

The outgoing LibDem leader denied he deceived voters who backed his party in the election.

He went on: “They're giving the party the vote, and the LibDems, thanks to what we've done in the last two years, will continue.

"In every election there is a reasonable chance that leaders will step down.

"When you make a decision and it's in your head and you've not really shared it with anybody, not written it down, it's there to be changed.

"I went into that campaign trying to... fight for the country I believed in."

Mr Farron also revealed that, like Theresa May, he had shed a tear after the election.

Despite hopes of a shift in the party’s fortunes because of its hardline opposition to Brexit, the LibDems went from just nine MPs to 12, with vote share down from 7.9 to 7.4 per cent.

Mr Farron said the party had “left intensive care” and returned to relevance since he took over from Nick Clegg in 2015 following the party’s post-Coalition wipeout.

“My job was to save the party,” he said.

“The Liberal Democrats still exist and we’re moving forward.”

Since Mr Farron announced his departure, East Dunbartonshire MP Jo Swinson has become the party’s deputy leader, while former business secretary Sir Vince Cable is the only candidate for leader, with nominations due to close next week.

“If there’s only one candidate, then that’s how it is,” said Mr Farron.