Here are some of the highlights from his six-minute resignation speech delivered outside No 10 Downing Street.
On resigning
"It is clearly now the will of the parliamentary Conservative party that there should be a new leader of that party and therefore a new prime minister... the process of choosing that new leader should begin now and the timetable will be announced next week.
"And I've today appointed a cabinet to serve, as I will, until a new leader is in place."
On this week's events
"The reason I have fought so hard in the last few days to continue to deliver that mandate in person was not just because I wanted to do so, but because I felt it was my job, my duty, my obligation, to you to continue to do what we promised in 2019.
"In the last few days, I've tried to persuade my colleagues that it would be eccentric to change governments when we are delivering so much and when we have such a vast mandate...
"And I regret not to have been successful in those arguments and, of course, it's painful not to be able to see through so many ideas and projects myself."
On his legacy
"I'm immensely proud of the achievements of this government -- from getting Brexit done, to settling our relations with the continent for over half a century; reclaiming the power for this country to make its own laws in parliament; getting us all through the pandemic; delivering the fastest vaccine rollout in Europe, the fastest exit from lockdown; and in the last few months, leading the West in standing up to (Russian President Vladimir) Putin's aggression in Ukraine."
On the next leader
"In politics, no one is remotely indispensable, and our brilliant and Darwinian system will produce another leader, equally committed to taking this country forward through tough times, not just helping families to get through it, but changing and improving the way we do things...
"And to that new leader I say, wherever he or she may be, I will give you as much support as I can."
To the British public
"I know that there will be many people who are relieved, and perhaps quite a few who will also be disappointed. And I want you to know how sad I am to be giving up the best job in the world. But them's the breaks!"
"I want to thank you, the British public, for the immense privilege that you have given me and I want you to know that, from now on until the new prime minister is in place, your interests will be served and the government of the country will be carried on."
To the people of Ukraine
"I know that we in the UK will continue to back your fight for freedom for as long as it takes."
In conclusion
"Being prime minister is an education in itself. I've travelled to every part of the United Kingdom and in addition to the beauty of our natural world, I found so many people possessed of such boundless British originality, and so willing to tackle old problems in new ways, that I know that even if things can sometimes seem dark now, our future together is golden.
(AFP)