The embattled Prime Minister choked with emotion as she confirmed she will stand down as Tory leader on Friday 7 June – paving the way for a new PM.
Mrs May finally caved to a Tory mutiny in a moving statement outside 10 Downing Street.
Watched by her grim-faced husband Philip in the spring sunshine, she said finding a new Prime Minister is now in “the best interests of the country”.
She said it was a matter of “deep regret” that her Brexit deal failed three times. She added: “I have done everything I can to convince MPs to back that deal. Sadly I have not been able to do so.”
It triggers a chaotic summer Tory leadership contest that could make a hard Brexiteer Prime Minister and pitch the UK towards a no-deal exit on October 31.
The PM is expected to remain in post as a lame duck when Donald Trump visits the UK on June 3, then as a caretaker while the contest to replace her takes place.
Her voice choked with emotion as she said: “I will shortly leave the job that it has been the honour of my life to hold.
“The second female Prime Minister,” she said, “but certainly not the last.”
Her voice finally broke as she said: “I [leave] with no ill will, but with enormous and enduring gratitude to have had the opportunity to have served the country I love.”
Mrs May used her moving speech to warn her successor – likely to be a hard Brexiteer – that consensus in Parliament wouldn’t magic itself into existence.
She quoted an organiser of the Kindertransport evacuation, Sir Nicholas Winton, who told her: “Life depends on compromise.”
She added: “It is and will always remain a matter of deep regret that that I have not been able to deliver Brexit.
“It will be for my successor to seek a way forward that honours the result of the referendum.
“To succeed, he or she will have to find consensus in Parliament where I have not.
“Such a consensus can only be reached if those on all sides of the debate are willing to compromise.”
Mrs May’s hand was forced after a last-ditch attempt to convince MPs to back her Brexit plan – by promising a possible second referendum – prompted Tory bedlam.
Commons leader Andrea Leadsom resigned in protest and key Cabinet ministers, including Sajid Javid and Jeremy Hunt, met the PM to warn her the game was up.
Meanwhile Tory backbenchers on the 1922 Committee threatened to change party rules and force Mrs May out if she refused to stand down.
She announced her decision moments after a meeting this morning with 1922 Committee chairman Sir Graham Brady.
Mrs May was holed up in her constituency home with husband Philip last night before slinking in the back door of No10 just before 9am.
Her speech was meant to be kept secret but was announced to the entire press pack in an accidental No10 e-mail – a final gaffe that is a metaphor for her time as PM.
The decision is a humiliating final act for the ‘Dancing Queen’ Prime Minister, who repeatedly had to cut short her ambitions and saw Brexit derail her attempts to roll back the most extreme parts of Tory austerity.
The pledge she made when she took office in July 2016 to tackle “burning injustices” was made a mockery as her premiership was forced to focus entirely on Brexit.
Her disastrous choice to call a snap election in 2017 saw her lose the majority hard-won by David Cameron and plunge Brexit into crisis.
And her premiership was marked by U-turn and humiliation, from being mocked for holding hands with Donald Trump to scrapping the hated “dementia tax”.
Today marks the fourth time she has brought forward her resignation after initially promising it in the 2022 general election – then repeatedly trying to appease her MPs.
And she did not even make it to a fourth vote on her Brexit deal with the EU after the first three failed by 230 votes, 149 votes and 58 votes.
A leadership contest is expected to take around six weeks and will put the decision about Britain’s next PM in the hands of Tory members – many of whom are hard Brexiteers.
GMB General Secretary Tim Roache said: “This Government has given us more farcical scenes than The Thick Of It and more brutal be-headings than Game of Thrones.
“But no one is going to be sorry when this series ends, working people are sick of the Tories focusing on who is going to take Theresa May ’s job when thousands across the country are losing theirs.”
Boris Johnson is the frontrunner and Tory moderates are now hoping they can steer him to re-enter talks with the EU rather than crashing out with no deal.
Mr Johnson has already confirmed he will run, as has hard Brexiteer Esther McVey.
Leading the pack are also hard Brexiteer Dominic Raab and Andrea Leadsom, and former May allies Michael Gove and Jeremy Hunt.
In a sign of the party’s open mutiny, a Tory vice-chairwoman joined the leadership circus before the Prime Minister even made her announcement.
Helen Grant resigned her post this morning to avoid a conflict of interest because she wanted to back a leading candidate to “deliver Brexit.”
Former chancellor Ken Clarke said the leadership contest will be a “chaotic” harmful diversion” and “a tragic farce”.
It comes just hours after polls closed in yesterday’s European Parliament elections – which May had hoped would never take place.
Her Conservative party is expected to see a historic drubbing in the poll when results are announced on Sunday night.
She has suffered a Brexit backlash and surge in support for both Nigel Farage’s Brexit Party, along with a range of smaller Remain-backing parties.
May spent much of yesterday in her constituency with husband Philip, her closest confidante.
After holding “frank” meetings with senior cabinet ministers, who urged her to pull the Withdrawal Agreement Bill, she left Number 10 for Maidenhead.
She was later seen putting a brave face on and smiling as she cast her ballot in the election, with Philip at her side.
Veteran MP Mr Clarke even claimed the majority of Tory MPs did not back their own party yesterday.
He told BBC Radio 4’s Today programme: “I suspect the majority of Conservative MPs did not vote Conservative yesterday.”
Theresa May’s emotional statement in full
Ever since I first stepped through the door behind me as Prime Minister, I have striven to make the United Kingdom a country that works not just for a privileged few, but for everyone.
And to honour the result of the EU referendum.
Back in 2016, we gave the British people a choice.
Against all predictions, the British people voted to leave the European Union.
I feel as certain today as I did three years ago that in a democracy, if you give people a choice you have a duty to implement what they decide.
I have done my best to do that.
I negotiated the terms of our exit and a new relationship with our closest neighbours that protects jobs, our security and our Union.
I have done everything I can to convince MPs to back that deal.
Sadly, I have not been able to do so.
I tried three times.
I believe it was right to persevere, even when the odds against success seemed high.
But it is now clear to me that it is in the best interests of the country for a new Prime Minister to lead that effort.
So I am today announcing that I will resign as leader of the Conservative and Unionist Party on Friday 7 June so that a successor can be chosen.
I have agreed with the Party Chairman and with the Chairman of the 1922 Committee that the process for electing a new leader should begin in the following week.
I have kept Her Majesty the Queen fully informed of my intentions, and I will continue to serve as her Prime Minister until the process has concluded.
It is, and will always remain, a matter of deep regret to me that I have not been able to deliver Brexit.
It will be for my successor to seek a way forward that honours the result of the referendum.
To succeed, he or she will have to find consensus in Parliament where I have not.
Such a consensus can only be reached if those on all sides of the debate are willing to compromise.
For many years the great humanitarian Sir Nicholas Winton – who saved the lives of hundreds of children by arranging their evacuation from Nazi-occupied Czechoslovakia through the Kindertransport – was my constituent in Maidenhead.
At another time of political controversy, a few years before his death, he took me to one side at a local event and gave me a piece of advice.
He said, ‘Never forget that compromise is not a dirty word. Life depends on compromise.’
He was right.
As we strive to find the compromises we need in our politics – whether to deliver Brexit, or to restore devolved government in Northern Ireland – we must remember what brought us here.
Because the referendum was not just a call to leave the EU but for profound change in our country.
A call to make the United Kingdom a country that truly works for everyone. I am proud of the progress we have made over the last three years.
We have completed the work that David Cameron and George Osborne started: the deficit is almost eliminated, our national debt is falling and we are bringing an end to austerity.
My focus has been on ensuring that the good jobs of the future will be created in communities across the whole country, not just in London and the South East, through our Modern Industrial Strategy.
We have helped more people than ever enjoy the security of a job.
We are building more homes and helping first-time buyers onto the housing ladder – so young people can enjoy the opportunities their parents did.
And we are protecting the environment, eliminating plastic waste, tackling climate change and improving air quality.
This is what a decent, moderate and patriotic Conservative Government, on the common ground of British politics, can achieve – even as we tackle the biggest peacetime challenge any government has faced.
I know that the Conservative Party can renew itself in the years ahead.
That we can deliver Brexit and serve the British people with policies inspired by our values.
Security; freedom; opportunity.
Those values have guided me throughout my career.
But the unique privilege of this office is to use this platform to give a voice to the voiceless, to fight the burning injustices that still scar our society.
That is why I put proper funding for mental health at the heart of our NHS long-term plan.
It is why I am ending the postcode lottery for survivors of domestic abuse.
It is why the Race Disparity Audit and gender pay reporting are shining a light on inequality, so it has nowhere to hide.
And that is why I set up the independent public inquiry into the tragedy at Grenfell Tower – to search for the truth, so nothing like it can ever happen again, and so the people who lost their lives that night are never forgotten.
Because this country is a Union.
Not just a family of four nations.
But a union of people – all of us.
Whatever our background, the colour of our skin, or who we love.
We stand together.
And together we have a great future.
Our politics may be under strain, but there is so much that is good about this country. So much to be proud of. So much to be optimistic about.
I will shortly leave the job that it has been the honour of my life to hold – the second female Prime Minister but certainly not the last.
I do so with no ill-will, but with enormous and enduring gratitude to have had the opportunity to serve the country I love.