The Liberal Democrats had a mixed election. Their share of the vote fell as Great Britain returned sharply to two-party politics, and the early hopes of mobilising opposition to Brexit – never mind a hard Brexit – failed to materialise. The party nevertheless managed to make three net gains to take its number of seats to 12, but it was hard to disagree with Tim Farron’s decision to stand down as leader.

We need not be diverted by Mr Farron’s complaint that the “suspicion” of his Christianity meant “we are kidding ourselves if we think we live in a liberal and tolerant society”. He was asked legitimate questions about his views on matters of public policy and he was not happy with some of the answers he gave. The main reason he resigned as leader, however, was that he had not been effective enough.

He was an energetic campaigner and sometimes a good communicator. In the seven-way TV debate, to which Theresa May sent Amber Rudd as her substitute, he was one of the better performers. But in the end he failed to present a clear enough identity, and allowed younger Remain supporters to believe that the best way to oppose Brexit was to vote Labour.

The election result has certainly been interpreted, including by The Independent, as a warning against a headlong rush to a hard Brexit. But it remains important that those who have their doubts about leaving the EU continue to be represented.

Tim Farron resigns as leader from the Liberal Democrats

Labour’s stance is compromised to the point of muddle, and in the debates that follow over the next two years it is important that voices arguing to keep options open are heard. Of course, the idea that “the 48 per cent” who voted to stay in the EU could be mobilised as a bloc was never realistic. About half of Remainers want the Government to get on with Brexit; many of the rest have other political priorities. But the case against Brexit still needs to be made.

In one respect, the Liberal Democrats are in a stronger position than other parties. In Jo Swinson and Sir Vince Cable, they do at least have alternative leaders who hold out the prospect of widening the party’s appeal.

Conservative MPs pulled back last week, having peered, and not for the first time, into the abyss of Prime Minister Boris Johnson. Labour MPs pulled forward, rallying to Jeremy Corbyn when they expected to be agonising over whether Yvette Cooper really would have been a better prospect.

One thing the Lib Dems should learn from recent history is the importance of a properly contested leadership election. Ms May’s weakness as a campaigner was exposed in the general election; it should have been tested at the hustings in front of party members last year. Ms Swinson, Sir Vince and any other contenders for the Lib Dem leadership should not make the same mistake. They need to be given the chance to take their campaigns to party members and to use the contest to exploit media interest. Above all, the Lib Dems need to deal with their legacy on tuition fees, which has conceded so much of the youth vote – and the parents-of-the-youth vote – to Mr Corbyn’s idealistic pitch.

It may yet take the Lib Dems a long time to regain their relevance. The number of seats where the party is polling in second place has shrunk dramatically, so the prospects of gains at the next election, whenever that is called, are limited. But there is still a need for a party that is committed to the free movement of people in Europe, that stands for liberal values and that is more sceptical than Labour about tax, spend, nationalise and borrow.