Commons Speaker John Bercow has announced that he will stand down in a little over a month.
In an impassioned speech Mr Bercow, who has held the influential post for just over 10 years, also said he would step down as MP for Buckingham.
The Speaker told the Commons he would resign on Monday night in the unlikely event MPs vote for an early general election, but said if they did not he would stand aside on October 31.
As his wife Sally looked on from the gallery, Mr Bercow said: “At the 2017 election, I promised my wife and children that it would be my last.
“This is a pledge that I intend to keep. If the House votes tonight for an early general election, my tenure as Speaker and MP will end when this Parliament ends.
“If the House does not so vote, I have concluded that the least disruptive and most democratic course of action would be for me to stand down at the close of business on Thursday October 31.”
He continued: “Least disruptive because that date will fall shortly after the votes on the Queen’s Speech expected on October 21 and 22.
“The week or so after that may be quite lively and it would be best to have an experienced figure in the chair for that short period.
“Most democratic because it will mean that a ballot is held when all members have some knowledge of the candidates.
“This is far preferable to a contest at the beginning of a parliament when new MPs will not be similarly informed and may find themselves vulnerable to undue institutional influence.”
He added: “We degrade this parliament at our peril”.
The Speaker said that he has “sought to be the backbenchers’ backstop”, and thanked his team in the Speaker’s House for their work behind the scenes.
Mr Bercow entered Parliament in 1997 and held several shadow ministerial positions before taking the Speaker’s chair on June 22 2009, promising to serve “no more than nine years in total”.
He abandoned that commitment ahead of the 2017 snap election, but allegations of bullying by former members of his staff, denied by the Speaker, led to fresh calls for him to quit.
In recent months he has also come under fire for a series of controversial rulings in the chamber which were widely considered to favour Remain supporters.
Labour leader Jeremy Corbyn praised Mr Bercow for being a “superb” Speaker, and said he had “totally changed the way in which the job has been done”.
“This Parliament is stronger for your being Speaker. Our democracy is the stronger for your being the Speaker.
“And whatever you do when you finally step down from Parliament, you do so with the thanks of a very large number of people,” Mr Corbyn said.
For the Government, Chancellor of the Duchy of Lancaster Michael Gove said it was clear Mr Bercow loved the House of Commons and democracy, adding: “Your commitment to your principles and to your constituents is unwavering and an example to others.”
Mr Gove joked that he hoped Mr Bercow would not take it personally when he votes for an early general election, adding: “It is the case that however controversial the role of the backstop may be in other areas, your role as the backbenchers’ backstop has certainly been one that’s been appreciated by individuals across this House.”
However Brexit Party leader Nigel Farage tweeted “good riddance” in response to Mr Bercow’s announcement.
Veteran Tory MP Sir Edward Leigh confirmed his intention to stand to replace Mr Bercow, while Labour’s Chris Bryant has previously put his hat in the ring.
Other potential successors include Commons deputy speaker Sir Lindsay Hoyle and Labour former Cabinet minister Harriet Harman.