Boris Johnson is in a race against time to secure the Democratic Unionist party’s backing for his newly negotiated Brexit deal as EU leaders said they were ready to approve the agreement on Thursday if the prime minister succeeds.

Plans to publish a full legal text ahead of the leaders’ summit had to be put on hold to the frustration of EU officials after the DUP raised a series of objections to the tentative agreement.

With time short, Johnson told a meeting of Conservative MPs he was hopeful of a deal but it felt like he was on the Hillary Step of Mount Everest while the summit was “shrouded in mist”.

The prime minister appeared to have the party’s hardline Eurosceptics onboard, including Steve Baker, who said Johnson had briefed them that the whole of the UK was leaving the customs union. But they also added a note of caution that they could not vote for any Brexit deal without seeing a legal text. The 21 former Tory MPs who have recently lost their whip could also rebel.

An issue over VAT was said by Michel Barnier, the EU’s chief negotiator, to be a last-minute obstacle in the negotiations when he briefed European ambassadors on Wednesday night. But the British objection was described by EU diplomats as a “British smokescreen” to give Downing Street more time to win over the DUP’s leader, Arlene Foster.

EU officials think Johnson could make a sudden move to seal the deal on Thursday morning. Earlier in the day, Donald Tusk, the president of the European council, had said the “foundations” of a Brexit deal were in place and it was only last-minute “doubts” in London that stood in the way.

Under the agreement, Barnier told ambassadors that a regulatory and customs border would be drawn in the Irish Sea.

Northern Ireland would legally be in the UK’s customs territory to allow the prime minister to boast that the country “whole and entire” has left the EU.

But it will follow EU rules on tariffs and quotas with exceptions for people moving personal goods, such as furniture, between Great Britain and Northern Ireland and an undefined category of other goods that cannot be processed and shipped into the EU. These goods will be agreed by a joint committee of UK and EU officials in the future, giving the EU control over the list.

Barnier further explained that four years after the end of the transition period, the Northern Ireland assembly at Stormont would be able to give its continued consent to continuing the arrangements. The assembly would have to decide whether to vote by a simple majority or under a vote in which 40% of both nationalist and unionist assembly members would be required to give their assent. A 60% threshold of all members would need to be passed in that case. If Stormont is not sitting, the status quo would continue.

Quick Guide Why is the Irish border a stumbling block for Brexit? Show Counties and customs Inside the EU, both Ireland and Northern Ireland are part of the single market and customs union so share the same regulations and standards, allowing a soft or invisible border between the two.

Britain’s exit from the EU – taking Northern Ireland with it – risks a return to a hard or policed border. The only way to avoid this post-Brexit is for regulations on both sides to remain more or less the same in key areas including food, animal welfare, medicines and product safety. The 'backstop' in Theresa May's Withdrawal Agreement was intended to address this - stating that if no future trade agreement could be reached between the EU and the UK, then rules and regulations would stay as they are. This has been rejected by Brexit supporters as a 'trap' to keep the UK in the EU's customs union, which would prevent the UK striking its own independent trade deals. There are an estimated 72m road vehicle crossings a year between Northern Ireland and the Republic of Ireland, and about 14% of those crossings are consignments of goods, some of which may cross the border several times before they reach a consumer. Brexit supporters say this can be managed by doing checks on goods away from the border, but critics say it will be difficult to police this without any physical infrastructure like border posts or cameras, which could raise tensions in the divided communities of Ireland.

Interactive: A typical hour in the life of the Irish border Photograph: Design Pics Inc/Design Pics RF

There would be another opportunity a further four years later to give consent if they voted by simple majority, and eight years later if they took the cross-party route. A two-year notice period would be granted if Northern Ireland exited the special relationship with the EU to allow alternative arrangements to be put in place.

Johnson has also made a major concession to secure a free-trade agreement with the EU. The prime minister had previously signalled he wanted to abandon a pledge to align to EU standards on the environment, workers’ rights and tax, fuelling Brussels’ fears of a regulatory race to the bottom and the creation of “Singapore on the Thames”.

Barnier told EU ambassadors he now had secured a basis for fair competition, as Johnson had agreed that the quid pro quo for any free-trade agreement would be signing up to the EU’s “level-playing field” provisions, meaning a promise not to ditch EU standards.

EU negotiators have long said these promises are vital, because of the UK’s economic weight and geographical proximity.

Barnier told the EU ambassadors the British cabinet had backed the agreement, but stressed huge uncertainty that parliament would give its approval. Several ambassadors voiced concern about the limited time, but there was no discussion of extension.

During a joint appearance with the German chancellor, Angela Merkel, the French president, Emmanuel Macron, told reporters: “I think that a deal is just being finalised and we’re going to be able to work on that tomorrow.”

Tusk had said that he had hoped that a deal would have been ready by Wednesday morning but that agreement was still possible. “Yesterday evening I was ready to bet that it’s all set and agreed, today there are certain doubts on the British side,” he said. “Everything is going in the right direction, but you will have noticed yourselves that with Brexit and above all with our British partners anything is possible.”

“We are still waiting for a signal from across the Channel,” said one EU diplomat. “A lot of things are happening between the cabinet, DUP and the hardest Brexiters.”

Despite the prospect of a deal being struck in Brussels, EU sources said the prime minister’s pledge to leave the EU on 31 October, “do or die”, remained in doubt even if an agreement was secured.

EU diplomats said the last-minute nature of the talks meant that time would be required after the summit for governments and parliaments to scrutinise the legal text of the deal.

Q&A What is the European Research Group (ERG)? Show The European Research Group (ERG) is a research support group for Conservative MPs who oppose the UK's membership of the European Union. It was formed in 1993 as a response to the Maastricht Treaty which reformed the European Economic Community as the European Community. The group is part-funded by subscriptions paid out of MPs’ parliamentary expenses, and is currently chaired by MP Steve Baker, with Mark Francois as his deputy. Jacob Rees-Mogg was previously chair. The group publishes research and reports on the UK's membership of the EU, although it is secretive about its work, and does not even issue a list of members.

As a result, the EU’s leaders will only give their political rather than full formal agreement to the deal when they meet on Thursday and Friday.

The EU27 will then want the Commons, in its “super Saturday” session, to give its assent to the revised withdrawal agreement and political declaration.

Final EU agreement would be given at a later date, likely at a second summit on 29 October, once the member states had time to work through the legal text. Sources in Berlin have suggested that process could take as long as two months.

“It is clear that there can only be a political agreement tomorrow or Friday because we cannot see any text. We cannot say ‘yes’ without legal scrubbing,” a diplomat said. “We need much more time.”

The diplomat added that the leaders would require “clarity from the House of Commons on Saturday because we’ve had three deals before”.

“This is the fourth time they want clarity from the UK side,” the diplomat added. “We won’t continue with legal scrubbing and translations to end up with something that is going to be voted down. There is a clear desire for an outcome in London that shows support.”