Theresa May steps down in an emotional speech.

“It is and will always remain a matter of deep regret to me that I have not been able to deliver Brexit,” May, her voice breaking, said outside her Downing Street office.

May, 62, said she would step down as Conservative Party leader on June 7.

She would remain as prime minister in a caretaker role until a replacement is elected by the party.

The leader of the party automatically becomes prime minister.

May, who took charge in the aftermath of the 2016 EU referendum, was forced to make way following a mutiny in her cabinet and Conservative Party over her ill-fated strategy to take Britain out of the European Union.

She will become one of Britain’s shortest-serving post-WWII prime ministers, remembered for presiding over one of the most chaotic periods in the country’s modern political history and for her inability to deliver Brexit.

Second but not the last

“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,” May 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 said, appearing close to tears as she turned back abruptly and walked back into her office.

May was pushed into the humiliating spectacle of announcing her departure from office following a meeting with the head of the Conservative Party committee in charge of leadership elections.

She had previously said she would step aside once her unpopular EU divorce deal had been passed by parliament, and this week launched a short-lived bid for lawmakers to approve it in early June, that has now been postponed.

MPs have overwhelmingly rejected the withdrawal agreement she struck with European Union leaders last year three times, brutally weakening May on each occasion.

With her resignation, the manner of Britain’s withdrawal from the European Union appears more uncertain than ever.

She had been under growing pressure to quit following months of political paralysis over Brexit, which have intensified in recent weeks following disastrous results in the May 2 English local elections.

The Conservatives are expected to fare similarly badly in this week’s European Parliament elections when the results are announced late Sunday. UK PM Thresa May resigns.

One last roll of the dice

May’s latest effort to force through her despised Brexit deal, which included giving MPs the option of holding a referendum on the agreement, proved her final undoing.

The move prompted a furious reaction from Conservatives — including cabinet members.

“I thought she deserved one last roll of the dice. But she took those dice and threw them off the table,” a senior minister told The Times.

The clamour for her to stand down reached fever pitch after Andrea Leadsom — one of cabinet’s strongest Brexit backers — resigned on Wednesday from her post as the government’s representative in parliament.

She became the 36th minister to quit May’s dismally dysfunctional government — a modern record. In her resignation letter Leadsom told the prime minister she no longer believed her approach to Brexit would deliver on the 2016 referendum result to leave the EU.

Several senior cabinet ministers reportedly then held “frank” talks with May on Thursday.

No deal?

May’s departure will kickstart a Conservative Party leadership contest — already unofficially under way — that is expected to be encompass more than a dozen candidates and favour a Brexiteer.

That could lead to Britain, which has already twice delayed its departure from the European Union, opting to leave the bloc without a deal on October 31, the extended deadline agreed with Brussels last month.

Tory MPs will hold a series of votes to whittle the contenders down to a final two that will be put to the party’s more than 100,000 members.

Former foreign secretary and gaffe-prone Brexit cheerleader Boris Johnson is the membership’s favourite, but a considerable number of Conservative MPs are thought to hold serious reservations about his suitability for the top job.

He has repeatedly said Britain should not fear a so-called no-deal Brexit. A man holds a banner during a demonstration against Britain's decision to leave the European Union, in central London, Britain on July 2, 2016. [Reuters]

No legacy

May was the surprising victor in a 2016 leadership contest to replace predecessor David Cameron after he resigned in the aftermath of the Brexit referendum

Despite having campaigned to stay in the EU, she embraced the cause with the mantra “Brexit means Brexit”.

However the decision to hold a disastrous snap election in June 2017, when she lost her parliamentary majority, left her stymied.

May will leave office without any significant achievements to her name — other than the bungled handling of Brexit, according to political analysts.

“She doesn’t really have a legacy that she can call her own other than just having to manage what is a very difficult issue,” said Simon Usherwood, from the University of Surrey’s politics department.