Boris Johnson has repeatedly refused to rule out suspending parliament to push through a no-deal Brexit.

And the prime minister sent a signal to Commons speaker John Bercow not to stand in the way of his efforts to ensure Britain leaves the EU with or without a deal on 31 October, insisting that all parliamentarians had a duty to respect the will of the people.

Mr Johnson’s comments came as US president Donald Trump warned that London may not be able to reach an agreement with Brussels by the Halloween deadline.

“They may have to get out, they may not make a deal,” said the president. “The EU is very tough to make deals with. Just ask Theresa May.”

In an effective dismissal of Ms May’s premiership, Trump said he had been waiting for Mr Johnson to become prime minister “for about six years” and had asked him when they met at the G7 summit in France: “What took you so long?”

Brexit culture: film posters reimagined Show all 5 1 /5 Brexit culture: film posters reimagined Brexit culture: film posters reimagined The Hunchback of Notre Dame with a Brexit spin Jeff Moore / Rooftop Film Club Brexit culture: film posters reimagined Les Miserables reimagined Jeff Moore / Rooftop Film Club Brexit culture: film posters reimagined A Room with a View of Britain's future Jeff Moore / Rooftop Film Club Brexit culture: film posters reimagined Roman Holiday relocated Jeff Moore / Rooftop Film Club Brexit culture: film posters reimagined The Sound of Music reimagined Jeff Moore / Rooftop Film Club

During a press conference at the conclusion of the Biarritz summit, Mr Johnson made clear he was not ruling out the use of the procedure known as prorogation to stop MPs coming together across party lines to block Brexit.

Opposition parties are due to meet on Tuesday to discuss parliamentary tactics for blocking no deal. And Brexiteers fear Mr Bercow may use his powers as speaker to allow opportunities for Remain-backing MPs to frustrate Mr Johnson’s plans.

Asked about the speaker’s role, Mr Johnson said: “I hope that all parliamentarians will use their good offices to respect the will of the people and get Brexit done.”

After a week in which he has spoken with his counterparts in Germany and France as well as European Council president Donald Tusk about Brexit, Mr Johnson said he was “marginally more optimistic” about securing a fresh withdrawal agreement before Halloween.

He made clear he expected negotiations to go right to the wire, saying Britain would not “walk away” until the 31 October deadline arrived. But he insisted that any new deal must remove the controversial backstop arrangement for the Irish border.

“The EU does tend to come to an agreement right at the end,” he said. “Clearly for us the walking away, as it were, would come on 31 October when we would take steps to come out … we would have by then made absolutely colossal extensive and fantastic preparations.”

Mr Johnson said he believed that other EU states, as well as the British public, now wanted to put Brexit behind them and move on.

“I think that it’s the job of everybody in parliament to get this thing done,” he said. “I think it’s what the people want, I also think by the way it’s what our friends and partners on the other side of the Channel want.

“They want this thing done, they want it over.

“You talk to our friends as I have done in the last few weeks and they are very enthusiastic about getting on with the future. They regard Brexit now as an encumbrance, an old argument. They want to talk about the new partnership that we’re going to build.

“They want to talk about ways in which we can work together not just on trade but on security, on defence, on all kinds of things and I think it’s time we in the UK started to think about all the ways in which we can think of a post-Brexit Britain doing things differently, and doing thing better, taking the opportunities to boost investment in our businesses and our industry, setting up free ports, doing free trade deals.

“There are big, big opportunities for this country so I think we need a new way of thinking about it but first of all, as you know, we’ve got to come out on 31 October.”

Mr Trump, who held an hour of face-to-face talks with Johnson on Sunday, restated his belief the new prime minister is “the right man” to deliver Brexit.

“I really believe that Boris Johnson will be a great prime minister,” said the president. “We like each other and we had a great two and a half days.

“I’ve been waiting for him to be prime minister for about six years. I told him, ‘What took you so long?’

“He is very smart and very strong and enthusiastic and he really loves your country.

“I think his time is right. This is the right time for Boris.”

He added: “Theresa was unable to do the deal. I gave her my ideas as to doing the deal very early on. She chose to do it her way and that didn’t work out too well. I think she’s a very good person and a good woman.”

Asked whether the UK or EU would be the US’s most important European partner after Brexit, Mr Trump said: “Both. I don’t want to say which.