The Speaker of the House of Commons  has vowed "creativity" in Parliament if Boris Johnson ignores the law designed to stop a no-deal Brexit.

John Bercow also said in a speech that the only possible Brexit was one backed by MPs.

The warning came as the EU's chief negotiator said there is "no reason to be optimistic" that a new agreement can be brokered before the Prime Minister's deadline to ask for a delay.

Michel Barnier told political leaders in the European Parliament on Thursday that he was unable to say whether contacts with the UK Government would result in a deal by mid-October.

The PM is legally bound to ask Brussels for an extension to Article 50 if he cannot get MPs to back a deal by October 19, after Parliament approved legislation designed to prevent a no deal.

Mr Barnier's warning came after the PM was forced to deny lying to the Queen in order to secure his five-week suspension to Parliament as the Halloween departure deadline looms.

READ MORE: John Bercow to stand down as Commons Speaker at next general election or 31 October

A new law, passed before the suspension of Parliament, forces the PM to seek a delay until 31 January 2020, unless a deal or no-deal exit is approved by MPs by 19 October.

And Mr Bercow said in a London speech that the so-called Benn Act enforcing the extension means the only possible Brexit outcome is one approved by Parliament.

The Herald: John Bercow

The PM has said he would rather be "dead in a ditch" than ask for a delay.

Delivering a lecture in London, Mr Bercow said: "Not obeying the law must surely be a non-starter. Period."

He said it would be a "terrible example to set to the rest of society".

"The only form of Brexit which we will have, whenever that might be, will be a Brexit that the House of Commons has explicitly endorsed," he said.

READ MORE: Harriet Harman praises John Bercow as she makes bid to replace him as Commons Speaker

"Surely, in 2019, in modern Britain, in a parliamentary democracy, we - parliamentarians, legislators - cannot in all conscience be conducting a debate as to whether adherence to the law is or isn't required."

He called it "astonishing" that "anyone has even entertained the notion".

Mr Bercow compared refusing to ask for a delay in "what one might regard as the noble end" of Brexit to a bank robber insisting they would give their loot to charity.

If the Government comes close to disobeying the Act, the MP said that Parliament "would want to cut off such a possibility and do so forcefully".

"If that demands additional procedural creativity in order to come to pass, it is a racing certainty that this will happen, and that neither the limitations of the existing rule book nor the ticking of the clock will stop it doing so," he added.

Mr Johnson would not have to ask for an extension to January 31 if MPs approved a deal or no deal under the Benn Act, which was pushed through Parliament by opposition MPs and Tory rebels.

But Mr Barnier, in a speech to MEPs, suggested that negotiating a new withdrawal agreement remained uncertain despite discussions between Mr Johnson's team and the EU.

"I cannot tell you objectively whether contacts with the Government of Mr Johnson will be able to reach an agreement by mid-October," he said.

"While we have previously reached an agreement, as far as we can speak, we have no reason to be optimistic."

He added: "We will see in the coming weeks if the British are able to make concrete proposals in writing that are legally operational."

The developments came on a day in which the PM "absolutely" denied lying to the Queen to get the suspension of Parliament.

Scotland's highest civil court ruled on Wednesday that the prorogation was unlawful because it was obtained for the "improper purpose of stymying Parliament".

Mr Johnson said the High Court in England had taken the opposite view to the Court of Session in Edinburgh and that the case would now be decided in the Supreme Court.

He also insisted he was "very hopeful" that he could secure a deal by the EU summit starting on October 17.

Meanwhile, the full opinions from the judges at the Edinburgh court emerged on Thursday evening.

READ MORE: Judge Lord Carloway said the "true reason" for the suspension was to reduce time for "Parliamentary scrutiny of Brexit" in a "clandestine manner"

On Friday, the Boris Johnson will head to South Yorkshire to reaffirm his pledge to give greater powers to northern political leaders.

"We are going to maximise the power of the North and we are going to make sure that it is people here who are in control over the things that matter to them," he will say in a speech to business leaders and politicians.

But Labour's shadow communities and local government secretary Andrew Gwynne said no-one will be "fooled by this whistle-stop tour and cheap speech when every day, people are living with the consequences of a decade of austerity and cuts to public services".