Theresa May today steps down as leader of the Conservative Party, though she will remain prime minister until her successor is chosen.

As promised in her tearful statement on the steps of 10 Downing Street on May 24, Ms May will formally quit as Tory leader ahead of the handover of power to a new PM at the end of next month.

The final day of her stint at the Tory helm was marked by defeat at the ballot box, as the party slumped into third place in the Peterborough by-election behind both Labour and Nigel Farage’s insurgent Brexit Party.

Failure to win back a seat that was Conservative as recently as 2015 set the seal on a calamitous period in power for a prime minister who was forced out by her own troops amid electoral debacle and an inability to deliver Brexit.

Having entered office on 13 July 2016 with a promise to take Britain out of the European Union (EU) and tackle “burning injustices” in UK society, Ms May found her premiership bogged down in Brexit negotiations and failed in three attempts to get her eventual deal through parliament.

She had secured the Tory leadership two days earlier by default, after her only remaining rival Andrea Leadsom dropped out of the contest.

Candidates in the Peterborough by-election Show all 15 1 /15 Candidates in the Peterborough by-election Candidates in the Peterborough by-election Mike Greene, Brexit Party Brexit Party parliamentary candidate Mike Greene during a Brexit Party rally at the Broadway Theatre in Peterborough, ahead of the upcoming by-election. PRESS ASSOCIATION Photo. Picture date: Saturday June 1, 2019. Peterborough is to hold a by-election on June 6 to find a replacement for MP Fiona Onasanya after she lost her seat through a recall petition. See PA story POLITICS Farage. Photo credit should read: Danny Lawson/PA Wire PA Candidates in the Peterborough by-election Paul Bristow, Conservative Party Conservative party candidate Paul Bristow talks to veterans during a D-Day 75th anniversary event in Peterborough as voting gets under way in the Peterborough by-election. PRESS ASSOCIATION Photo. Picture date: Thursday June 6, 2019. See PA story POLITICS Peterborough. Photo credit should read: Joe Giddens/PA Wire PA Candidates in the Peterborough by-election Lisa Forbes, Labour Party Labour Party candidate Lisa Forbes who will contest the vacant seat in the Peterborough by-election. PRESS ASSOCIATION Photo. Picture date: Thursday May 9, 2019. The city's by-election on June 6 will find a replacement for MP Fiona Onasanya who lost her seat through a recall petition after serving time in prison for lying about a speeding offence. See PA story POLITICS Peterborough. Photo credit should read: Joe Giddens/PA Wire PA Candidates in the Peterborough by-election Beki Sellick, Liberal Democrat Candidates in the Peterborough by-election Joseph Wells, Green Party Candidates in the Peterborough by-election John Whitby, UKIP Candidates in the Peterborough by-election Patrick O'Flynn, Social Democratic Party Patrick O'Flynn, Ukip Economic Spokesman and PPC for Cambridge delivers his speech during the Ukip Spring Conference at the Winter Gardens Theatre in Margate, Kent. PA Archive/PA Images Candidates in the Peterborough by-election Dick Rogers, Common Good: Remain in the EU Candidates in the Peterborough by-election Bobby Smith, Independent Candidates in the Peterborough by-election Tom Rogers, Christian People's Alliance Candidates in the Peterborough by-election Andrew John Moore, Independent Candidates in the Peterborough by-election Peter Ward, Renew Candidates in the Peterborough by-election Stephen Goldspink, English Democrats Candidates in the Peterborough by-election Pierre Kirk, UK European Union Party Candidates in the Peterborough by-election Alan "Howling Laud" Hope, Official Monster Raving Loony Party Leader of the Monster Raving Loony Party Alan 'Howling Laud' Hope who is his party's candidate for the Uxbridge and South Ruislip constituency in this year's General Election, in Westminster, London. PA

But she lost her majority in a disastrous general election, held at a time of her own choosing in 2017, and became the only PM in history to have her government found in contempt of parliament.

Tellingly, Ms May’s formal removal as Tory leader was not being marked by any ceremony or fanfare.

Having returned from commemorations of the 75th anniversary of D-Day in Normandy, the PM was spending her last day as leader in her Maidenhead constituency.

From there, she will send a formal resignation letter to the acting co-chairs of the Tory backbench 1922 Committee, Charles Walker and Dame Cheryl Gillan. The letter, and their reply, are not expected to be published.

Ms May will remain as acting Tory leader and stay in 10 Downing Street as prime minister until her successor – probably Boris Johnson, or one of his closest rivals Jeremy Hunt, Michael Gove or Dominic Raab – is elected by Conservative members towards the end of July.

The length of the leadership contest will allow her to leapfrog Neville Chamberlain to become the UK’s 33rd longest-serving PM, having outlasted Gordon Brown last month.

Theresa May's full speech as she announces her resignation

Labour held on to Peterborough by a margin of 683 over the Brexit Party, which took huge chunks out of the Tory vote with its promise of a no-deal Brexit.