Here is the full text of Ed Miliband's resignation speech.
"Thank you for your kindness, friends. Friends, this is not the speech I wanted to give today because I believe that Britain needed a Labour government. I still do, but the public voted otherwise last night. Earlier today I rang David Cameron to congratulate him. I take absolute and total responsibility for the result and our defeat at this election.
"I am so sorry for all of those colleagues who lost their seats. Ed Balls, Jim Murphy, Margaret Curran, Douglas Alexander, and all the MPs and indeed candidates who were defeated. They are friends, colleagues, and standard bearers for our party. They always have been, and they always will be.
"I also want to congratulate all our candidates who were elected yesterday and who will help take our party forward as well.
"I want to thank those people who ran our campaign. It was the most united, cohesive, and enjoyable campaign I’ve ever been involved in. I want to thank Douglas Alexander, Lucy Powell, Spencer Livermore, and most of all, all of you, the incredible team at the Labour Party.
"I also today want to thank the incredible team of Labour Party members, activists, and all those people who’ve pounded the streets over the past months.
"Friends: Britain needs a strong Labour Party. Britain needs a Labour Party that can rebuild after this defeat so we can have a government that stands up for working people again. Now it’s time for someone else to take forward the leadership of this party, so I’m tendering my resignation taking part after this afternoon’s commemoration of VE Day at the Cenotaph. I want to do so straight away because the party needs to have an open and honest debate about the right way forward without constraint.
"Let me say that Harriet Harman is the best Deputy Leader that anyone could hope for. I worked for her more than 20 years ago, I am proud to have had her as my deputy for my term of leadership.
"She will take over until a new leader is elected. For me, I’m looking forward to reacquainting myself with Justine, Daniel, and Sam. But before I need to say thank you to the British people. Thank you to the people who’ve met me on train stations and colleges, in workplaces and schools. Thank you for sharing your stories from me, I have learnt so much for you.
"It has been an enormous privilege. Thank you for the selfies, thank you for the support, and thank you for the most unlikely cult of the 21st century, Milifandom. Second, I want to address those who voted Labour yesterday.
"Today you’ll feel disappointed, even bleak but while we may have lost the election, the argument of our campaign will not go away: the issue of our unequal country will not go away, this is the challenge of our time, the fight goes on, and whoever is our new leader, I know Labour will keep making the case for a country that works for working people once again.
"Third, I believe in our United Kingdom, not just because it is our country, but because it is the best way of serving the working people of our country. I believe that there is more that unites us than divides us across the whole United Kingdom and all of us in the months and years ahead must rise to the challenge of keeping our country together.
"Finally, I want to say something to my party. Thank you to you. Thank you for the privilege. I joined this party aged 17. I never dreamed I would lead it. It has been an incredible force for progress from workers’ rights to the NHS to the minimum wage.
"No other party in British politics can boast these achievements and yes, it will be a force for progress and change once again, To all the Labour party members you’re amazing people, I thank all of you today. I am truly sorry I did not succeed. I have done my best for nearly five years.
"Now you need to show your responsibility. Your responsibility, not simply to mourn our defeat: pick yourself up, and continue the fight. We’ve come back before and this party will come back again.
"If I may I say to everyone in our party: conduct this leadership election with the same decency, civility, and comradeship that we believe is the way the country should be run.
"I believe I have brought a culture to this party, an ability to have disagreement without being disagreeable. I urge everyone to keep this in mind in the months ahead.
"Finally, I want to say this. The course of progress and social justice is never simple or straightforward. Change happens because people don’t give up, they don’t take no for an answer, they keep demanding change.
"This is my faith: where we see injustice, we must tackle it. In a couple of hours I will no longer be leading this party, but you see, for me, that has never been the only way to achieve change, because I believe it isn’t simply leaders who achieve change, it is people who make change happen. I will never give up on that idea, I will never give up on that cause, I will never give up on fighting for the Britain I believe in.
"That faith will always be my faith, that fight will always be my fight, that cause will always be my cause – and I will always be there in that cause with all of you. Thank you very much."
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies