Read the full transcript of Gordon Brown's resignation speech in full, on politics.co.uk.
"As you know, the general election left no party able to command a majority in the House of Commons.
"I said I would do all that I could to ensure a strong, stable and principled government was formed, able to tackle Britain's economic and political challenges effectively.
"My constitutional duty is to make sure that a government can be formed following last Thursday's general election.
"I have informed the Queen's private secretary that it's my intention to tender my resignation to the Queen. In the event that the Queen accepts, I shall advise her to invite the leader of the opposition to form a government. I wish the next prime minister well as he makes the important choices for the future.
"Only those who have held the office of prime minister can understand the full weight of its responsibilities and its great capacity for good. I have been privileged to learn much about the very best in human nature, and a fair amount too about its frailties, including my own. Above all, it was a privilege to serve. And, yes, I loved the job, not for its prestige, its title and its ceremony, which I do not love at all. No, I loved this job for its potential, to make this country I love fairer, more tolerant, more green, more democratic, more prosperous and more just - truly a greater Britain.
"In the face of many challenges in a few short years, challenges up to and including the global financial meltdown, I have always strived to serve, to do my best in the interests of Britain, its values and its people. And let me add one thing also. I will always admire the courage I have seen in our armed forces. And now that the political season is over, let me stress that having shaken their hands and looked into their eyes, our troops represent all that is best in our country and I will never forget all those who have died in honour and whose families today live in grief.
"My resignation as leader of the Labour party will take effect immediately. In this hour I want to thank all my colleagues, ministers, members of parliament. And I want to thank above all my staff who have been friends as well as brilliant servants of the country. Above all, I want to thank Sarah for her unwavering support, as well as her love, and for her own service to our country. I thank my sons John and Fraser for the love and joy they bring to our lives. And as I leave the second most important job I could ever hold I cherish even more the first, as a husband and father. Thank you and goodbye."