John Bercow says he will stand down as Commons Speaker at the next election or on 31 October, whichever comes first.
Speaking in Parliament, Mr Bercow said his 10-year “tenure” was nearing its end and it had been the “greatest honour and privilege” to serve.
If there was no early election, he said leaving on 31 October would be the “least disruptive and most democratic” exit.
The ex-Tory MP succeeded the late Michael Martin as Speaker in 2009.
He has faced fierce criticism from Brexiteers who have questioned his impartiality.
In a break from normal convention, Mr Bercow was facing a challenge from the Conservatives in his Buckingham constituency at the next election – whenever it is called.
Mr Bercow’s wife, Sally, was in the public gallery as he made his announcement.