Sir Vince Cable has agreed to step down as Liberal Democrat leader after three years to let Jo Swinson take over if he wins the leadership, The Telegraph can disclose.

The party is facing its second hunt for a new leader in two years following the resignation of Tim Farron over the conflict between his faith and political career.

Ms Swinson, a newly elected MP and former minister, is understood to have hammered out the deal with Sir Vince at the end of last week in the days after Mr Farron resigned, party sources told The Telegraph.

One source said Sir Vince had agreed to quit after after two or three years if he is made leader: “Vince has the most experience and is what the party needs in the next couple of years. Everyone thinks that. But the future is Jo Swinson.”

Ms Swinson, 37, said at the weekend that she would stand not for the leadership, leaving the way open for Sir Vince to become leader at the age of 74.

She announced at the weekend she would stand for the party’s deputy leadership instead and was elected unopposed on Tuesday evening.