John Bercow has announced he will stand down as speaker of the House of Commons by the Brexit deadline of 31 October.

Mr Bercow made the surprise statement to MPs to stand aside after a decade in the role, just hours before Boris Johnson’s decision to suspend parliament until 14 October kicked in.

The Commons speaker, who has faced intense criticism from Brexiteer MPs and ministers in recent months, told MPs he would resign by the Halloween deadline for Brexit, unless a vote for an early general election is passed before then.

Announcing his decision, Mr Bercow said that throughout his time as speaker he has “sought to be the backbenchers’ backstop”, and said it had been the “greatest privilege and honour of my professional life”.

The resignation came amid speculation that the Conservative Party was planning to stand a candidate against the former Tory MP at the next general election after he granted MPs a vote on taking control of the Commons.

Protesters take to streets after Boris Johnson suspends parliament Show all 11 1 /11 Protesters take to streets after Boris Johnson suspends parliament Protesters take to streets after Boris Johnson suspends parliament Anti Brexit protesters march on Whitehall EPA Protesters take to streets after Boris Johnson suspends parliament Many of the protesters carried placards AP Protesters take to streets after Boris Johnson suspends parliament A demonstrator wears a Boris Johnson mask during a London rally AFP/Getty Images Protesters take to streets after Boris Johnson suspends parliament An anti-Brexit demonstrator wields an EU flag during a London rally. AFP/Getty Images Protesters take to streets after Boris Johnson suspends parliament The protesters also marched to Trafalgar Square, where they blocked traffic AP Protesters take to streets after Boris Johnson suspends parliament John McDonnell addressed crowds in Whitehall. PA Protesters take to streets after Boris Johnson suspends parliament A small group of Brexit supporters attempted to stage a counter protest in central London. AP Protesters take to streets after Boris Johnson suspends parliament Three people were arrested in London, including a woman who sat on the road near Trafalgar Square. AP Protesters take to streets after Boris Johnson suspends parliament In Oxford, locals and students gathered outside Balliol College, Boris Johnson's alma mater, to protest. PA Protesters take to streets after Boris Johnson suspends parliament Thousands of people gather in central Glasgow to protest against the prime minister. AFP/Getty Images Protesters take to streets after Boris Johnson suspends parliament Jeremy Corbyn spoke to protesters in central Glasgow. Getty

The timing means that the next speaker is likely to be in place before a general election – preventing Mr Johnson from installing a hardline Brexiteer to the position if he wins a considerable majority.

Addressing the Commons while his wife watched 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.”

Responding to Mr Bercow’s remarks in the Commons, Jeremy Corbyn praised the speaker for his “superb job”, adding: “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 offered his thanks on behalf of the Labour Party, noting: “Enjoy the last short period in your office – but it’s going to be one of the most dramatic there has been.

“I think your choice of timing and dates is incomparable and will be recorded in the history books of parliamentary democracy.”

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 he hoped Mr Bercow would not take it personally when he votes for an early general election on Monday evening, 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.”