Between Monday 4 December and the following Friday, there were frantic phone calls between Dublin, London and Brussels.

That Monday, the DUP had torpedoed the joint report tortuously hammered out between British, Irish and EU task force officials.

With the critical European Council looming on 14 December, Donald Tusk, the European Council President and his European Commission counterpart Jean-Claude Juncker effectively gave all sides four days to salvage the deal.

Otherwise, the UK could not move into phase two of the talks.

Ireland was not budging on the backstop, the guarantee of no hard border in which Northern Ireland would remain aligned with the rules of the customs union and single market if no other solution could be found.

As far as Dublin was concerned, it had been agreed in good faith. It would find its home in paragraph 49.

To get the DUP back on board, officials drew up paragraph 50, saying that in the event of the backstop being deployed, there would be no barriers on trade between Northern Ireland and the rest of the UK.

In the early hours of Friday morning, there was a final phone call between Downing Street and Arlene Foster, the DUP leader. Mrs Foster felt it needed more time, but Theresa May didn’t have any more time.

Mrs Foster reluctantly agreed, Mrs May flew to Brussels and the deal was sealed at dawn.

At the time, few outside the tight group of negotiators paid too much attention to the strict wording of paragraph 49.

But the phrasing of it has suddenly pitched the Brexit negotiations into a very different - if not potentially fatal - direction.

The exact words which give rise to the backstop are: "In the absence of agreed solutions [ie, a free trade agreement and/or technology], the United Kingdom will maintain full alignment with those rules of the Internal Market and the Customs Union which, now or in the future, support North-South Cooperation, the all-island economy and the protection of the 1998 Agreement."

The fact that paragraph 49 says that "the UK will …" and not "Northern Ireland will…" has become an issue that dramatically exceeds the semantic niceties of the text.

The proposal that the UK is expected to make on customs in the coming week or so hinges on that quirk of phrasing.

The implications of it are enormous.

All sides now recognise that the UK is relying on their interpretation of what was implied in order to break the deadlock - and not everyone is happy about it.

British officials are in disagreement with their Irish and EU counterparts as to what the nuance meant, and what was implied.

According to a key British source: "Those half dozen people who were doing the final negotiation of that December text knew precisely what that final text for the last sentence of [paragraph] 49 could mean."

To this reading, the text deliberately stated that it would be the UK as a whole that would align with the rules of the single market and customs union precisely so that there would be no difference between Northern Ireland and the rest of the UK.

It was a further bolstering of paragraph 50, say British sources, which spelled out that there would be no barriers along the Irish Sea.

"That week, and the changes to the text (especially paragraphs 49 and 50) were all about making it clear that Northern Ireland could not be separated on any grounds from the rest of the UK without the say so of the Northern Ireland Executive," said the British source.

"Key people in the commission and Dublin knew that, and were comfortable with the ambiguity of the final sentence."

Irish and EU officials, naturally, have a different view and accuse London of "revisionist thinking".

"It’s a bit of a stretch to say it was deliberate," said one Irish source. "I believe it happened fairly quickly and it was noted there was an ambiguity there, and nobody felt there was any great advantage in illuminating that ambiguity."

One immediate problem is that any attempt to portray alignment as happening across the UK as a whole strays into the realm of Britain’s future trading relationship with the EU.

That, as we know, is a matter for the Future Framework Treaty, and not the Withdrawal Treaty, which is where the backstop will legally reside.

EU officials suspect the UK is now using the ambiguity in paragraph 49 to define their future relationship in one fell swoop.

They say that paragraph 46 of the joint report, indeed, ensures they can’t do that.

It states: "The commitments and principles outlined in this Joint Report will not pre-determine the outcome of wider discussions on the future relationship between the European Union and the United Kingdom, and are, as necessary, specific to the unique circumstances on the island of Ireland."

In January and February, EU officials began converting the Irish part of the joint report into a protocol to be included in the draft legal text.

The drafting involved members of the EU task force, led by Michel Barnier, as well as the legal services of both the European Commission and the European Council.

It is understood that it was an intense process. The idea of part of what was soon to be a third country remaining within the EU’s customs and single market structures was new and controversial ground. 

Significantly, in light of recent developments, EU task force officials were adamant throughout that the backstop was only for Northern Ireland, and not for the UK as a whole.

When asked to explain the fact that paragraph 49 states clearly that "the UK will" align, a source points out that the EU is negotiating with a member state - the United Kingdom - so it makes sense that it is the UK that will be making those key decisions, and not a part of the UK.

Whatever about the provenance of that line, it is now where the action is. And Ireland is in something of a bind.

During a 40-minute meeting in Sofia this week, Theresa May talked Leo Varadkar through the British customs plan. He described it to reporters afterwards as "new thinking" and said he was "not discouraged" by the meeting.

However, he was circumspect, to say the least, about whether it would work. In short, Dublin would keep its counsel until a written proposal was tabled.

The Taoiseach did lay down two markers. Even if the UK, via the language in paragraph 49, align as a whole on customs for a period of time (until 2023, according to one report), customs was only one part of the hard border problem: there would still have to be alignment on those rules of the single market that facilitated North-South co-operation, and so on.

He hinted that he made this point several times to Theresa May, which suggests the British believe that they can avoid a hard border using the backstop in relation to customs only.

The second marker was that, no matter what, the backstop had to be legally operable, there in black and white in the Withdrawal Agreement.

The problem for Ireland is that interpreting paragraph 49 in this way is both toxic and seductive: toxic because the EU has real reservations about it and seductive because a neat continuation of the UK in the EU’s customs sphere would, at a stroke, remove the offensiveness of the backstop for unionists, reduce the problem of €65 billion in east-west trade and finally dislodge the Tories from the circular infighting over customs that has crippled the negotiating process.

"It’s not a trade-off," said one source. "If they can just get some movement on this, and start negotiating on this future partnership or customs partnership, or whatever they want to call it, then it will help them unblock the discussion generally and get agreement on the backstop as well."

London is only too aware of the attractions for Dublin of turning the Irish Protocol UK-wide.

"If it turns out that the [Irish] Protocol describes this amazing world that solves everything in one go for the whole of the UK and the whole of the EU, the Irish say, ‘Brilliant!’ That solves our east-west problem, as well as our north-south problem," says one UK source.

Dublin is wary of such sentiment. The Government is also extremely mindful of the European Commission’s reservations, given that they fought so hard to keep the backstop Northern Ireland-specific in the draft legal text.

"The task force has been looking into it and would, entirely reasonably say, ‘we shouldn’t underestimate how difficult this will be to do’," says one figure close to the negotiations. "But that’s a different problem than saying, ‘we don’t think this can work, or it’s not politically acceptable’."

Why would it not be politically (or legally) acceptable to the EU?

There are several reasons. As mentioned, this is seen as the UK grabbing an unwarranted shortcut into its future trade relationship using the backstop.

Secondly, if you follow the logic of London’s interpretation of paragraph 49, the UK would also align with the rules of the single market, but without having to apply the four freedoms, or without accepting the role of the European Court of Justice - in other words, cherry-picking.

London’s riposte to that is that it would not be cherry-picking to gain a competitive economic advantage over the EU, rather it would only be to solve the border question.

British sources point out that, if there was selective alignment on the single market it would not cover services, and that is where London sees the British economy growing.

"If you turn that protocol UK-wide, it is the shittiest deal for the UK ever," complains one British source. "It deals with no services issues whatsoever. For the Germans, the French, the Dutch, the Irish, the Belgians, the Danes - who all have this massive goods or agri surplus with us - all of their issues get fixed in one go.

"Yet what the UK needs, in terms of its ability to grow - services - is not covered at all."

But there is one key worry for the European Commission. To understand it, we need to go back to Theresa May’s customs partnership idea.

That model, which was rejected by Brexiteers, would have meant the UK presiding over two tariff regimes: its own, and that of the EU.

If goods coming into the UK were destined for the EU27, then British customs officials would work out the difference between the EU tariff and the UK tariff that importers would have to pay, they would collect the difference and pass it on to the EU, or they would reimburse importers if they had to pay a higher tariff than was warranted.

EU officials looked with horror at such a scenario. They would have to trust the customs officials of a third country (the UK) to act as their agents. If there was a complaint by an importer or exporter then, technically, they could not refer the case on to the European Court of Justice because that would cross one of Theresa May’s red lines.

But, in fact, this is precisely what the European Commission has agreed to in the Irish Protocol, albeit on a smaller scale, and despite the fact that under the backstop the writ of the ECJ would still extend to Northern Ireland.

The EU would be, at worst, having to trust British customs officials at Northern Irish ports, who would be employed by a third country, to carry out inspections on the EU’s behalf, or at best, carry out those inspections alongside EU customs officers.

Therefore, by turning the Irish Protocol UK-wide, the EU would have to accept something they are already very nervous about, but on a much bigger scale.

The other question is how would this extension of the UK’s involvement in the EU’s customs sphere work?

At the end of the two-year transition (31 December 2020), the UK will automatically be out of the customs union.

Would the UK therefore seek an extension of the transition, and if so, when?

It would have to be done well before the October deadline for the Withdrawal Agreement. Any customs arrangement will imply high alignment on goods and standards. Will Brexiteers swallow that?

Beyond that, there must be concerns in Dublin about what exactly Theresa May has in mind. To pacify the Brexiteers, she will assert that this is a temporary, interim solution, and that when the future trade arrangements are worked out, the need for the backstop will melt away.

But Leo Varadkar will be under enormous pressure to ensure that the backstop is way more permanent, and will outlive any temporary customs arrangements. EU officials are at pains to stress that a Free Trade Agreement does not, in itself, obviate the need for border checks.

Irish officials are acutely aware of these pitfalls. For Dublin, the legal text will have to be armed with the "unless and until" caveat (in other words, the backstop strictly stays in place unless and until something better comes along that guarantees no hard border, no infrastructure, no checks and controls).

"We can’t dilute or delete the necessarily legal element of the backstop on a kind of a promise of something better coming along," says one source. "That is the whole point of the backstop. It’s an insurance policy or a guarantee."

Dublin, in essence, believes that the dynamic of the negotiations requires an openness to the British proposal, however strong the reservations.

"The overtures and the messaging from Ireland and the task force are that we’ve never ruled out a close customs relationship provided it’s one that fits with whatever are the established norms of that relationship. We could have that discussion."

But it is a risky period. Theresa May turning the Irish Protocol UK-wide is fraught with danger, both for her own position, and in terms of how squeamish the EU and other member states are about what appears to be a dizzying, last-minute somersault.