U.K. prime minister Boris Johnson repeatedly refused to rule out suspending parliament in order to force through a no-deal Brexit | Jeff J Mitchell/Getty Images Boris Johnson predicts last-minute Brexit deal ‘I do think that the EU does tend to come to an agreement right at the end,’ says UK prime minister.

BIARRITZ, France — Boris Johnson said on Monday he is "marginally" more optimistic he could seal a new Brexit deal following meetings with EU leaders in recent days, but admitted the task is "difficult" and that agreement could come "right at the end" of the process.

Speaking at the G7 summit in Biarritz, the U.K. prime minister repeatedly refused to rule out suspending parliament in order to force through a no-deal Brexit, should an agreement with Brussels not be possible.

In the closing press conference of his first international summit, an exuberant Johnson said that chances of a deal depend "exclusively" on the EU and whether it is prepared to strip the Northern Ireland backstop plan out of the Brexit agreement.

“I do think that the EU does tend to come to an agreement right at the end, that’s what I’ve noticed in my own observation of Brussels negotiations," he said. He added that the point of "walking away" for the U.K. would only come on October 31, the legal deadline by which the country is set to leave.

He said the country "would have by then made absolutely colossal, extensive and fantastic preparations” for a no-deal Brexit.

However, he gave no specific timetable for resuming talks. The EU has said it is waiting for the U.K. to bring forward detailed alternative proposals to the backstop before it will consider a formal renegotiation. Downing Street officials accompanying Johnson in Biarritz said Monday that discussions would continue this week "at sherpa level" led by Johnson's Europe adviser David Frost.

Johnson will fly back from Biarritz into a looming political storm at home. MPs return to parliament next week and opposition parties and rebel Conservatives are seeking to block him from taking the U.K. out without a deal.

The prime minister has not ruled out suspending parliament to prevent MPs from blocking his path. “I rely on parliamentarians to do the right thing and honor the pledge that they made to the people of this country," he said on Monday, when asked why he could not make the commitment.

Asked whether he has confidence in Speaker of the House of Commons John Bercow, who is the final arbiter of House of Commons rules and is expected to play a crucial role in the coming parliamentary tussles, Johnson said: “I hope that all parliamentarians will use their good offices to respect the will of the people and get Brexit done.”

A U.K. government official said Monday that Johnson has warned EU leaders not to believe MPs that say they could block a no-deal Brexit.

“The prime minister has been very clear to European leaders that he’s seen in the last week that the idea that Brexit is going to be stopped is incorrect, we are leaving on October 31, with a deal or without," the official said. "He thinks European leaders should not be listening to some of the very wrong messages emerging from some parliamentarians who think that they will stop Brexit.”