Theresa May has said she will quit as Conservative leader on 7 June, paving the way for a contest to decide a new prime minister.
In an emotional statement in Downing St, she said she had "done my best" to honour the 2016 EU referendum result.
It would remain a matter of "deep regret" that she had been unable to deliver Brexit, she added.
Mrs May said she will continue to serve as prime minister while a Conservative leadership contest takes place.
She will step down as Tory leader on 7 June and a leadership contest is due to begin the following week.
The prime minister has faced a backlash from her MPs against her latest Brexit plan, which included concessions aimed at attracting cross-party support.
Andrea Leadsom quit as Commons leader on Wednesday saying she no longer believed it would "deliver on the referendum result".
Mrs May met Home Secretary Sajid Javid and Foreign Secretary Jeremy Hunt at Downing Street on Thursday where they are understood to have expressed their concerns about the bill.
In her statement on Friday, she said that in order to deliver Brexit, her successor would have to build agreement in Parliament.
"Such a consensus can only be reached if those on all sides of the debate are willing to compromise," she said.
Mrs May said she had done "everything I can" to convince MPs to support the withdrawal deal she had negotiated with the European Union but it was now in the "best interests of the country for a new prime minister to lead that effort".
Mrs May's voice shook as she ended her speech saying: "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."
Labour Leader Jeremy Corbyn said she had been "right to resign" and that the Conservative Party was now "disintegrating".
A series of Conservative MPs praised Mrs May following her statement.
Foreign Secretary Jeremy Hunt said she was a "true public servant":
Chief whip Julian Smith praised her commitment to the country as "outstanding".
And Mrs Leadsom, who quit on Wednesday, said the prime minister's speech had been "very dignified".
Following her emotional coda to her statement on the steps of Downing Street, expect the tributes to Theresa May to flood in, even from those pushing her from office.
Her resilience. Her determination. Her sense of duty.
Ultimately, though, her premiership fell apart in an attempt to bring people together.
Her Brexit deal stymied by too many of her own MPs, she tried to reach out across the Commons.
But in proposing a vote on a referendum - even though she expected MPs to reject another public vote - she over-reached.
Some members of her cabinet who are manoeuvring to replace her withdrew their consent from her latest plan, effectively throwing out its compromises and her leadership.
She pointed today to some of her achievements in office but frankly she has had to announce the timetable for her departure before securing the legacy she desired - leaving the EU with a deal.
In a hung parliament, the question now is whether the next Conservative leader will be able to succeed where she failed.
Or whether something more radical will be required: no deal, a new referendum, or a general election.
Compiled by Olalekan Adeleye
BBC