London CNN  — 

John Bercow, the outgoing Speaker of the UK House of Commons, has warned Prime Minister Boris Johnson against ignoring the law and implementing a no-deal Brexit on October 31, a move that he compared to “robbing a bank.”

Bercow said he would allow Parliament to use “additional procedural creativity” to thwart any attempt to circumvent legislation.

His speech, at the annual Bingham lecture in London on Thursday, comes after a bill aimed at preventing a no-deal Brexit was made law Monday. Later that day, Parliament was suspended, or prorogued, for five weeks at Johnson’s request.

But Johnson, who came to power on the promise that he would deliver Brexit by October 31, “do or die,” has said he would rather be “dead in a ditch” than ask Europe for any delay. The new legislation compels him to do so if no deal is reached by October 19.

“One should no more refuse to request an extension of Article 50 because of what one might regard as the noble end of departing from the EU as soon as possible, than one could excuse robbing a bank on the basis that the cash stolen would be donated to a charitable cause immediately afterwards,” Bercow said.

The Speaker announced on Monday that he will stand down by October 31 – the day the UK is set to leave the European Union – after a decade in the position.

Bercow said in his Thursday speech that it was “astonishing” that anyone entertained the idea of Johnson disobeying the law, as such a move “would be the most terrible example to set to the rest of society.”

He said that if the government came close to ignoring the bill, Parliament “would want to cut off such a possibility and do so forcefully.”

“If I have been remotely ambiguous so far, let me make myself crystal clear. The only form of Brexit that we have, whenever that might be, will be a Brexit that the House of Commons has explicitly endorsed,” Bercow added.

He said that if “that demands additional procedural creativity in order to come to pass, it is a racing certainty that this will happen.” Neither the “limitations of the existing rule book nor the ticking of the clock will stop it doing so,” he continued.

‘Sort it out, Boris’

Bercow’s speech added to another tough week for the Prime Minister, who rejected accusations Thursday that he lied to the Queen over his controversial prorogation of Parliament in the run-up to the Brexit deadline.

Johnson has always insisted that his decision was a routine move that allowed the government to start a new parliamentary session with a fresh legislative agenda. Critics describe it as an audacious ploy to reduce the amount of time available to the opposition to block a no-deal Brexit.

But the Prime Minister has faced a string of setbacks since he announced his intention to prorogue Parliament.

He has lost his working majority in Parliament and failed to secure a new election. He also ousted rebellious Conservative lawmakers, including former Cabinet ministers and Winston Churchill’s grandson, after they voted against him on the legislation passed on Monday.

On Friday, Johnson was heckled by a protestor while he spoke in Rotherham, northern England.

“Why are you not with them in Parliament sorting out the mess that you have created?” the man shouted.

“I’m very happy to get back to Parliament very soon,” Johnson replied as he attempted to return to his speech.

“Sort it out, Boris. Why don’t you sort it out, Boris? Why don’t you sort it out?” the protestor yelled.

On Wednesday, a Scottish court ruled that his government’s advice to the Queen, which led to the five-week prorogation, was “unlawful.”

According to the full ruling, released Thursday, one of the three judges said the suspension was motivated by the “improper purpose of stymying Parliament.”

“There was, and is, no practical reason for a prorogation for what is, in modern times, an extraordinary length of time,” Lord Carloway, Scotland’s most senior judge, said.

The ruling paves the way for a showdown in the UK Supreme Court next week – where judges will hear appeals on the Scottish case as well as an English challenge filed by prominent anti-Brexit campaigner Gina Miller.

Bercow added on Thursday that the chaos since the 2016 referendum vote to leave the EU has opened him to the idea that the UK may need a written constitution.

CNN’s Samantha Tapfumaneyi contributed to this report.