Boris Johnson was battling to win support for a revised Brexit deal from Northern Ireland’s Democratic Unionist party and hardline Eurosceptic MPs on Wednesday night as negotiators sought to hammer out a draft agreement in Brussels.

The British prime minister was trying to persuade his parliamentary allies in the DUP to back a deal that would introduce a customs and regulatory border between Northern Ireland and the rest of the UK. A UK government insider said a deal was not expected to be agreed on Wednesday evening because the DUP continued to hold out against a revised withdrawal agreement.

In Brussels, EU and UK negotiators managed to resolve their differences on a host of issues related to the Irish border after Brexit, including customs rules and Northern Ireland’s right to have a say on the arrangements, said people familiar with the talks. The key outstanding issue was how to prevent fraud involving value added tax.

“I want to believe an agreement is being finalised and that we will be able to endorse it tomorrow,” said Emmanuel Macron, the French president, at a press conference alongside Angela Merkel. The German chancellor commented that the news out of Brussels “could be worse”.

In an evening briefing, Michel Barnier, the EU’s chief Brexit negotiator, told diplomats from the 27 other EU member states that the two sides had made “substantial progress” and that talks would continue into Thursday, even as the political situation in the UK remained uncertain.

One Eurosceptic minister briefed on Mr Johnson’s plan said last night: “I’m very hopeful of a deal. I’m amazed at what he has achieved — it surpassed my expectations.”

The question now is whether a deal can be struck in time for a summit involving the bloc’s leaders on Thursday and Friday, allowing them to sign off the agreement.

Some EU governments are worried that they will not have time to examine the legal text in time for the start of the European Council summit, making formal endorsement by the leaders very difficult. One senior EU diplomat said this would raise the question of whether the UK would need an extension to its October 31 exit date to permit both the Westminster and European parliaments to ratify the departure deal.

The EU and the UK have been seeking ways to avoid a hard border on the island of Ireland after Brexit as part of a withdrawal agreement, and negotiators made substantial progress on the fine detail of the new arrangements during Wednesday.

The assessment is that Johnson has to do a deal now. He’s stuck. He’s cornered

The UK has conceded that Northern Ireland will apply the EU’s customs and tariffs rules and have them overseen by the European Court of Justice. The agreement means there will not be major customs checks on the island and instead all goods will be checked in Great Britain.

Under the agreement, Northern Ireland would benefit from UK trade deals with third countries — a core demand of Mr Johnson — and Northern Irish businesses would be eligible for a rebate on some tariffs should the UK secure them.

Key questions in the Brussels talks have included how to give the Northern Ireland Assembly at Stormont a say on the arrangements — a particularly sensitive topic for the DUP. The Brussels negotiators settled on a complex system that would involve the assembly in having the opportunity to hold a vote on the customs and regulatory arrangements four years after the end of the UK’s post-Brexit transition period.

If the assembly decided to continue with the arrangements, further opportunities to vote would arise in later years. Even if Northern Ireland were to vote to junk the system, a two-year cooling-off period would ensue.

The two sides also haggled over UK demands to deviate from EU environmental and labour standards after Brexit. The draft political declaration accompanying the withdrawal agreement makes it clear that a zero-tariff deal between the UK and EU will be predicated on a high level of regulatory alignment by the UK to EU standards.

One EU diplomat said there was “genuine enthusiasm” in Brussels for securing a deal but that the EU27 wanted to be certain that the DUP was on board and that Mr Johnson could pass any deal in the Commons.

Mr Johnson briefed his cabinet in London, and ministers agreed to a special sitting of the House of Commons on Saturday when MPs could be asked to vote on any Brexit deal struck with the EU.

Hilary Benn, the Labour MP behind legislation aimed at preventing a no-deal Brexit on Halloween, said MPs could use the Commons sitting on Saturday to try to attach a confirmatory referendum to any revised withdrawal agreement.

With a deal not assured, Steve Barclay, the Brexit secretary, confirmed to MPs that Mr Johnson would write to the EU seeking an extension to the Article 50 divorce process if no withdrawal agreement had been approved by the Commons on Saturday.

“The assessment is that Johnson has to do a deal now,” said an EU diplomat. “He’s stuck. He’s cornered.” The diplomat added that Mr Johnson was not concerned by being seen to capitulate, rather that he was asking himself: “What can I get away with?”

Reporting by Sam Fleming, Mehreen Khan and Jim Brunsden in Brussels and George Parker and Laura Hughes in London

