She said it had been ‘the honour of my life’ to ‘serve the country that I love’ but will step aside on June 7th.
Mrs May said she had ‘tried my best’ but it was ‘with deep regret’ that she was unable to deliver Brexit.
The speech on the steps of Downing Street marked a very dignified end to a politician who has spent the last three years attempting to take the UK out of the EU.
She said it was in ‘the best interests of the country’ for a new Prime Minister.
‘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,’ she said.
‘I do so with no ill-will, but with enormous and enduring gratitude to have had the opportunity to serve the country I love.’
She added: ‘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.’
A mass mutiny by the Conservative party earlier this week made her position untenable.
Mrs May has now set out a timetable for her successor to be chosen, with the week after June 7 marking the start of the official leadership race.
She has told the Queen that she will stay until her replacement is elected by the Conservative Party.
The outgoing leader had been under pressure to resign after a backlash by her own MPs against her latest Brexit plan.
Since January, Parliament has rejected the Brexit bill she negotiated with the EU three times.
Attempts to find a compromise with the Labour party ended in disaster. During her speech, she took a dig at her Tory colleagues and said that ‘compromise is not a dirty word.’
She also warned her successor against a hardline approach, saying a consensus across the political divide was needed.
Labour’s Jeremy Corbyn said the successor should call an immediate general election. On Tuesday, Mrs May made a final push with a set of amended proposals, including a customs union and an offer to give MPs a vote on holding another referendum.
That was met with a furious backlash by many in the Conservative party, leaving her authority in tatters.
Mrs May will remain until after the Peterborough by-election and the visit by US President Donald Trump.
Theresa May resigns as Prime MinisterThat would avoid the indignity of her MPs voting on her successor at the same time. A new leader is likely to be in place by the end of the summer after a series of votes by Tory MPs and the wider Conservative Party.
Their main job will be to get a Brexit deal through Parliament before October 31 – the date currently set for the UK’s exit from the European Union.
Mrs May spent Thursday in her Maidenhead constituency as the nation went to the polls to take part in an election she never wanted.
On Thursday, European Commission President Jean-Claude Juncker said he expected the UK to have to ask for another Brexit extension.
He accused UK politicians of prioritising a plot against Mrs May over trying to find an agreement over leaving the bloc.
It has also raised fears that the UK will now crash out of the EU without a deal should a Leave supporter take the keys to Number 10.
Mrs May’s decision to stand aside comes after senior Cabinet ministers warned they could not support her ‘new’ Brexit deal. Andrea Leadsom quit as Commons leader on Wednesday evening, saying she no longer believed the government’s approach would ‘deliver on the referendum result.’
On Thursday Home Secretary Sajid Javid and Foreign Secretary Jeremy Hunt met with Mrs May to express their concerns about the bill. Mr Hunt told her it was a ‘step too far’ to expect MPs to vote for the ‘watered-down’ proposals.
The bill had been due to go before Parliament next week but is now no longer scheduled. Boris Johnson is the favourite to take over from Mrs May but his position over Brexit could see him face difficulties forming a Cabinet, unless he softens his stance on a no-deal exit. Mr Javid and Mr Hunt are also in contention as is former Brexit Secretary Dominic Raab, Mrs Leadsom, Leave champion Michael Gove and newly-promoted defence chief Penny Mordaunt.
In her speech, Mrs May also went on to list her achievements during her time in office, clearly attempting to try to avoid Brexit being her only legacy.
She said the position of Prime Minister had allowed her the ‘unique privilege’ of using the platform to give a ‘voice to the voiceless’ and fight the ‘burning injustices that still scar our society.’
Mrs May listed her work on mental health care, domestic abuse, the race disparity audit, gender pay reporting, and the Grenfell Tower inquiry.
The Prime Minister said: ‘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.’