Theresa May will resign as British prime minister on Friday, June 7.
Speaking in front of 10 Downing Street on Friday morning, May said she had done everything she could to convince British MPs to back her deal for Brexit, but without success.
"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," she said.
She said it was a matter of "deep regret" that she could not deliver Brexit.
"It will be for my successor to seek a way forward that honours the result of the referendum." She said a consensus on Brexit could only be reached if those on all sides were willing to compromise.
May said it was the honour of her life to have served as prime minister and she was leaving with no "ill will".
An election to choose her replacement will begin on June 10, according to people familiar with the matter. There is likely to be a crowded field of candidates and the contest will be difficult to predict.
Tory party bosses hope to have a new leader in place by the end of July. The result will shape the direction of Brexit and all options - from leaving with no deal to canceling the divorce - are now back on the table.
May’s decision heralds the end of a turbulent, three-year premiership that’s been marked by bitter divisions within her party and across Britain over how to leave the European Union.
The UK was due to withdraw from the EU on March 29. But May’s inability to get the divorce deal she negotiated in Brussels approved in Britain’s deadlocked Parliament has forced her to delay exit day until October.
May’s Tory colleague and friend Damian Green paid tribute to her. “Seldom have we seen a prime minister more devoted to public service and it’s ending this way,” he told BBC Radio on Friday. “The overwhelming feeling I have today is sadness.”
It will now be for May's successor to define the course of Brexit. The current favorite is pro-Leave campaigner Boris Johnson, the UK’s former Foreign Secretary, who favors a quick, sharp split from the EU. The pound is on a losing streak as investors weigh up the prospect of a no-deal exit.