Below is the full resignation speech of Labour leader Ed Miliband, delivered following the party's "disappointing" results in the 2015 general election and shortly before David Cameron was confirmed as the next prime minister.
"Thank you for your kindness, friends. Friends, this is not the speech I wanted to give today because I believed 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're friends, colleagues and standard bearers for our party. They always have been and they always will be.
"I also want to congratulate all of 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 have 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. And I also today want to thank the incredible team of Labour Party members, activists and all those people who pounded the streets over the past few 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.
"And now it's time for someone else to take forward the leadership of this party. So I am tendering my resignation, taking effect 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 anyone could hope for. I worked for her more than 20 years ago, I'm 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 [Miliband's children]. But before I do I want to say a few things.
"First of all, thank you to the British people. Thank you to the people who have met me on train stations, in colleges, in workplaces, in schools. Thank you for sharing your stories with me, I have learned so much from 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 will 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. You know, I believe 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.
"And to all the Labour Party members, you are the most loyal supporters, 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 but to pick yourself up and continue the fight. We have come back before and this party will come back again.
"And 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 that the country should be run. I believe I have brought a culture to this party of 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 is not simply leaders who achieve change, it is people that 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."