Theresa May fought back tears as she announced she will resign as Conservative Party leader on 7 June, following months of pressure.
Mrs May said she had “done my best” to get her Withdrawal Agreement through parliament and to give people what they had voted for in the Brexit referendum of 2016.
“I believe it was right to persevere even when the odds against success seemed high,” she said.
But she acknowledged her failure, saying: “It is and will always remain a matter of deep regret to me that I have not been able to deliver Brexit.”
Watched by husband Philip and her closest aides, she said: “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.”
Fighting back tears, she said she was leaving the job “with no ill will”, adding that she was “the second female prime minister but certainly not the last”.
Concluding her statement, Mrs May broke down as she said it had been “the honour of my life” to serve “the country that I love”.
Mrs May’s announcement comes after a showdown this morning with Sir Graham Brady, chair of the 1922 committee of Tory MPs.
It also marks the end of a difficult week, after more MPs demanded her immediate resignation and a senior cabinet minister quit.
Brexiteer Andrea Leadsom said she could not support the revamped Withdrawal Agreement Bill because it did not respect the referendum result.
But on Friday Mrs Leadsom said Mrs May’s speech was “an illustration of her total commitment to country and duty”.
One of the candidates to replace Mrs May, Dominic Raab, described her as “dignified as ever…she remains a dedicated public servant”.
One of his supporters, Helen Grant, quit her role in Conservative Party headquarters barely an hour before Mrs May made her statement, to come out in support of Mr Raab.
Boris Johnson, bookies’ favourite to be the next Tory Party leader, tweeted: “A very dignified statement from @theresa_may. Thank you for your stoical service to our country and the Conservative Party. It is now time to follow her urgings: to come together and deliver Brexit.”
His response was met with criticism by many, including Scottish First Minister Nicola Sturgeon who tweeted: “Hypocrite.”
Mrs May’s chief of staff Gavin Barwell said: “I have seen at first hand her commitment to public service and her incredible resilience as she has confronted the biggest challenge any British government has faced since the Second World War. It has been an honour to serve her.”
In Europe, leaders were keen to remind the UK that the deal on the table for Brexit is unlikely to change. Simon Coveney, the Irish foreign minister said he did not think the EU would offer a “new or better deal” to a new leader.
French President Emmanuel Macron’s official said: “Our relations with the United Kingdom are critical in all areas. It is too early to speculate on the consequences of (May’s) decision.”
“We need rapid clarification” on Brexit, the spokesman added.
The prime minister’s resignation now starts a contest to become Britain’s next prime minister.
She will remain as a caretaker prime minister until the new leader is chosen and this could take several weeks.
Meanwhile, the UK is still due to leave the European Union on 31 October, but parliament has yet to approve the terms.