Here is Nick Clegg's resignation speech as leader of the Liberal Democrats in full:
"I always expected this election to be exceptionally difficult for the Liberal Democrats given the heavy responsibilities we’ve had to bear in government in the most challenging of circumstances. Clearly the 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 that 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’s 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. I want to thank every member, ever 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 2007 after a night of disappointing election results for our party in Edinburgh, Alex Cole Hamilton said this: if his defeat was 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 that we government with Britain a far stronger, fairer, greener, and more liberal country than it was five years ago.
"However unforgiving the judgement has been at 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 who are granted the opportunity to serve our country in government now and in the future will recognise the privilege and responsibility that they’ve been given. It’s the greatest thing they’ll ever do.
"It is of course too early to give a considered account of why we have suffered catastrophic losses we have, and the party will have to reflect on these in the time ahead. One thing seems to me is clear: liberalism, here, as well as across Europe, is not faring well against the politics of fear.
"Years of remorseless economic and social hardship following the crash in 2008 and the grinding insecurities of globalisation have led for people to reach to new certainties: the politics of identity, of nationalism, of us versus them is now on the rise.
"It is clear that in constituency after constituency north of the border the beguiling appeal of Scottish Nationalism has swept all before it and south of the border a fear about what that means for the United Kingdom has strengthened English conservatism too. This now brings our country to a very perilous point in our history where grievance and fear combine to drive our different communities apart.
"I hope that our leaders across the United Kingdom realise the disastrous consequences for our way of life and the integrity of our United Kingdom if they continue to appeal to grievance rather than generosity and fear rather than hope. It’s not exaggeration to say that in the absence of strong and statesmanlike leadership Britain’s place in Europe and the world and the continued existence of our United Kingdom itself is now in grave jeopardy. 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 needed more 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 the great cause that my successor will have to face. I will always give my unstinting support for 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 is 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. That is what has built our party before and will rebuild it again. Thank you."