“But clearly results have been immeasurably more crushing and unkind than I could ever have feared.
“For that, of course, I must take responsibility and therefore I announce I will be resigning as leader of the Liberal Democrats.
“A leadership election will now take place according to the party’s rules.
“For the last seven years it has been a privilege, a huge privilege, an unlimited honour to lead a party of the most resilient, courageous and remarkable people.
“The Liberal Democrats are a family and I will always be extremely proud of the warmth, good grace and good humour which our political family has shown through the ups and downs of recent years.
“So I want to thank every member, every campaigner, every councillor and every parliamentarian for the commitment you have shown to our country and to our party.
“It is simply heartbreaking to see so many friends and colleagues who have served their constituents so diligently over so many years abruptly lose their seats because of forces entirely beyond their control.
“In 2011, after a night of disappointing election results for our party, one of our candidates in Edinburgh - Alex Cole-Hamilton - said this, he said if his defeat is part-payment for the ending of child detention then he accepted it with all his heart.
“Those words revealed a selfless dignity which is very rare in politics but common amongst Liberal Democrats.
“If our losses today are part-payment for every family that is more secure because of a job we helped to create, every person with depression who is treated with a compassion they deserve, every child who does a little better in school, every apprentice with a long and rewarding career to look forward to, every gay couple who know that their love is worth no less than anyone else’s, and every pensioner with a little more freedom and dignity in retirement, then I hope at least our losses can be endured with a little selfless dignity too.
“We will never know how many lives we changed for the better because we had the courage to step up at a time of crisis.
“But we have done something that cannot be undone - because there can be no doubt we leave government with Britain a far stronger, fairer, greener and more liberal country than it was five years ago.
“However unforgiving the judgment has been of the Liberal Democrats in the ballot box, I believe the history books will judge our party kindly for the service we sought to provide to the nation at a time of great economic difficulty, and for the policies and values which we brought to bear in Government - opportunity, fairness and liberty, which I believe will stand the test of time.
“To have served my country at a time of crisis is an honour that will stay with me forever.
“I hope those that are granted the opportunity to serve our country in government now and in the future will recognise the privilege and responsibility they have been given.
“It’s the greatest thing you will ever do.
“It is of course too early to give a considered account of why we have suffered the catastrophic losses we have and the party will have to reflect on these in the time ahead.
“One thing it seems to me is clear: liberalism here, as well as across Europe, is not faring well against the politics of fear.
“I hope that our leaders across the United Kingdom realise the disastrous consequences for our way of life and the integrity of the United Kingdom if they continue to appeal to grievance rather than generosity, and fear rather than hope.
“It’s no exaggeration to say that in the absence of strong and statesman-like leadership, Britain’s place in Europe and the world and the continued existence of our United Kingdom itself is now in grave jeopardy.
“And the cruellest irony of all is that it is exactly at this time that British liberalism - that fine, noble tradition - that believes we are stronger together and weaker apart is more needed than ever before.
“Fear and grievance have won, liberalism has lost, but it is more precious than ever and we must keep fighting for it.
“That is both the great challenge and great cause that my successor will have to face.
“I will always give my unstinting support to all those who continue to keep the flame of British liberalism alive.
“On the morning of the most crushing blow to the Liberal Democrats since our party was founded, it’s easy to imagine that there is no road back - but there is because there is no path to a fairer, greener, freer Britain without British liberalism showing the way.
“This is a very dark hour for our party but we cannot and will not allow decent liberal values to be extinguished overnight.
“Our party will come back, our party will win again.
“It will take patience, resilience and grit but that is what has built our party before and will rebuild it again.