Outgoing Lib Dem leader Tim Farron has revealed he decided to quit several weeks before the general election but did not announce his decision publicly.
Mr Farron said he had put the decision “to bed” about two weeks into the campaign, and denied deceiving voters by continuing to fight the election.
“I absolutely threw everything at it,” he said.
He announced his departure six days after polling day, saying he was “torn” between the leadership and his faith.
The Liberal Democrats increased their tally of seats from nine to 12 at last month’s general election, but their vote share fell from 7.9% to 7.4%.
In an interview with BBC Radio 5 live’s Emma Barnett, Mr Farron said that under his leadership, the party had “left intensive care and is back relevant”.
“My job was to save the party,” he said.
“The Liberal Democrats still exist and we’re moving forward.”
Mr Farron faced repeated questions about his views on gay sex during the campaign, and when he announced his resignation, said he had found it impossible to be a committed Christian and lead a “progressive liberal party”.
Asked about his decision to quit, he said he had not wanted to “become the story”.
“I made the decision about two weeks into the election campaign,” he said.
“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.”
He said he had told himself to “put that into a drawer, don’t talk to anybody else about it, get on and do as good a job as you can during the election”.
Mr Farron said this had “not in the slightest” deceived voters, adding that “in every election there is a reasonable chance that leaders will step down”.
“I just thought ‘I am here to do a job,'” he said.
A leadership contest is under way to replace Mr Farron – and with a week to go before nominations close, just one candidate, former Business Secretary Sir Vince Cable, has come forward.
Mr Farron – who criticised Theresa May’s unopposed “coronation” as Tory leader – said Sir Vince had already been subject to “plenty of scrutiny”.
“If there’s only one candidate, then that’s how it is,” he added.
More From this publisher : HERE