Senior Liberal Democrats are urging Jo Swinson to stand for the party leadership after Tim Farron dramatically resigned, citing his Christian faith.

In a parting shot Mr Farron hit out at the scrutiny over his beliefs, adding "we are kidding ourselves if we think we yet live in a tolerant, liberal society”.

He has faced intense pressure in recent weeks over his views on homosexuality and abortion.

But he was also blamed for a disappointing election result, despite taking his party from nine to 12 seats last Thursday.

Critics said that his avowedly pro- European manifesto meant that that the Libs failed to retake their former stronghold in the south west of England, much of which voted for Brexit.

His announcement stunned Westminster just hours after he had outlined a contest for his party's deputy leadership.

Earlier, however, the party’s home affairs spokesman Brain Paddick quit – attacking the leadership.

Mr Paddick, who is gay, said that he had resigned “over concerns about the leader's views on various issues” highlighted during the General Election campaign.

The party's manifesto launch was overshadowed by a row about abortion after it emerged that Mr Farron had described it as "wrong" in an interview in 2007.

The controversy came just week after Mr Farron was embroiled in controversy over his views on whether gay sex is a sin.

He was criticised for taking days to say that he did not think it was.

Despite taking new constituencies, the Lib Dems lost seats last week, including that of former leader Nick Clegg.

Mr Farron only narrowly kept his own seat, by 777 votes after a recount, leaving his majority in Westmorland and Lonsdale cut by 8,172.

In a statement to Lib Dem staff, Mr Farron said that he was standing down because of continuing questions over his Christian faith.

"The consequences of the focus on my faith is that I have found myself torn between living as a faithful Christian and serving as a political leader," he said.

"A better, wiser person than me may have been able to deal with this more successfully, to have remained faithful to Christ while leading a political party in the current environment.

"To be a political leader - especially of a progressive, liberal party in 2017 - and to live as a committed Christian, to hold faithfully to the Bible's teaching, has felt impossible for me."

He added: "I seem to be the subject of suspicion because of what I believe and who my faith is in.

In which case we are kidding ourselves if we think we yet live in a tolerant, liberal society.”

Ms Swinson had been tipped as a contender for the deputy leadership role, especially after Mr Farron suggested that the job should be taken by a woman.

Senior Lib Dems are now hoping that Ms Swinson, who won her East Dunbartonshire seat back from the SNP's John Nicolson, will stand for the top job.

If she did she could be expected to face a tough challenge from former Business Secretary Vince Cable, who also became an MP again last week.

Mr Cable is seen as a standard bearer for the left of the party and could be expected to pick up lots of votes from members.

The Lib Dems enjoyed a resurgence in the wake of the Brexit vote and saw its membership soar to more than 100,000.

Scottish Lib Dem leader Willie Rennie said: “Tim Farron has been a dynamic, energetic and inspirational leader who took the party from the dark days following the 2015 election to its highest membership ever. He increased our parliamentary representation at this election with a diverse group of talented people.

“I will always be grateful for his friendship and leadership and I believe he still has a big role to play in British politics.”