Boris Johnson has threatened to withhold some of the UK’s £39 billion financial settlement with the EU, saying that in the case of a no-deal Brexit the cash is “no longer strictly speaking owed”.

Mr Johnson said that “very substantial sums” could be freed up for spending on UK priorities.

Speaking ahead of talks with European Council president Donald Tusk at the G7 summit in Biarritz, France, Mr Johnson said he had detected a “change in mood” in the EU and was hopeful of starting fresh Brexit talks.

But he admitted that it was “touch and go” whether a deal could be reached by the 31 October deadline on which he has promised to take Britain out with or without an agreement.

The prime minister’s comments come amid reports that Downing Street lawyers have calculated that as little as £7 billion of the cash may be payable if the UK leaves the European Union without a deal.

The £39 billion settlement forms part of the agreement sealed by Theresa May last November and rejected three times by Parliament.

Boris Johnson arrives in Biarritz on Saturday (PA)

It covers outstanding UK contributions to EU projects approved during Britain’s membership as well as future pensions for Brussels staff.

But crucially it also includes membership dues for the two-year transition period envisaged in Ms May’s agreement, which would not take place in a no-deal scenario.

Speaking ahead of talks with European Council president Donald Tusk at th G7 summit in Biarritz, France, Mr Johnson said: “If we come out without an agreement it is certainly true that the £39 billion is no longer, strictly speaking, owed

“There will be very substantial sums available to our country to spend on our priorities

“It's not a threat it's a simple fact of, of reality.”

Donald Tusk has warned Boris Johnson he will not cooperate on a no-deal Brexit (Sergei Supinsky/AFP/Getty Images)

Mr Johnson has previously said there was only a “million to one” chance of the UK crashing out of the EU without a deal on Halloween.

But fresh talks have been blocked by his insistence that the EU must ditch the controversial backstop for the Irish border.

Visits to Berlin and Paris in recent days have raised hopes of new talks, after Angela Merkel and Emmanuel Macron indicated they were willing to listen to Mr Johnson’s alternative ideas to keep the border open after Brexit.

Mr Tusk said he was ready for “serious talks” on an ideas that were “operational, realistic and acceptable to all member states, including Ireland”.

But he said: “The one thing I will not co-operate on is no-deal.

“I still hope that prime minister Johnson will not like to go down in history as Mr No-Deal.”

Boris Johnson threatens to withhold some of £39 billion Brexit divorce bill from EU

Asked what the likelihood was of a deal by Halloween, Mr Johnson told the BBC: “It all depends on our EU friends and partners. It depends very much on the willingness to co-operate and the Commons.

“I do think they understand there’s an opportunity to do a deal. I think it’s going to be touch and go.”

The PM took a morning dip in the Atlantic before heading in to breakfast talks with US president Donald Trump on Sunday.

And he used his swim as a metaphor for the Brexit process, telling ITV:

“I swam round that rock this morning. From here you cannot tell there is a gigantic hole in that rock. There is a way through.