At the conclusion of the EU-Arab League Summit in Sharm El-Sheikh, Donald Tusk spelled out the diminishing options for Theresa May.

There was still no majority in the House of Commons to approve the Withdrawal Agreement, so with 32 days left before the end of March, the alternative was "a chaotic Brexit or an extension".

The European Council President rather drily added: "An extension would be a rational decision but Theresa May believes she can avoid this scenario."

Within 24 hours Theresa May no longer believed she could completely avoid this scenario. On Tuesday, she conceded that if the Withdrawal Agreement was again rejected on March 12, then Britain may have to seek a "short, limited" extension to Article 50.

The prospect of an extension has been the subject of fevered speculation for months. While EU officials have been informally war-gaming the challenges it might pose, especially to the European elections, the sudden about turn has been unsettling.

"It was contrary to what she has been saying," says one EU diplomat. "No extension was the mantra. Then suddenly there’s a game plan with an extension. That unnerves the institutions, irritates them, and makes them even more sceptical,"

On Wednesday French president Emmanuel Macron said. "The time has come for the British to make choices.We don’t need more time, what we really need is a decision… Under no circumstances would we accept an extension without a clear perspective [on the objective of an extension]."

Read:

More Brexit stories

A formal discussion at EU level on an extension is just getting under way.But behind the scenes the mood is darkening."Over the past six weeks member states, including those friendly to the UK, are being much more rigorous over the conditions under which an extension will be granted," says one senior source. "It can’t be just hoofing the ball around the long grass."

Another diplomat said: "The main condition is that there should be a purpose for this.It would be difficult if the extension is only there to prepare for no deal. The extension needs to lead to something: either an approval [of the deal], or a general election, or a referendum or whatever. A process that gives us clarity."

The preference would be for a short extension running up to the end of June, so that the European Parliament elections could go ahead without UK participation since the parliament does not have to be legally constituted until 2 July.

If not, the EU would prefer a nine-month extension. This would keep the UK in right up until the end of this year’s financial cycle.

However, even a nine-month extension has raised the prospect of Britain having to contest the elections in May, or even September.

Britain has 73 seats. Of these, 27 have been reallocated to other member states (Ireland got two extra), while 46 have been held in reserve for future enlargements.

If Britain were to remain until the autumn, its seats would not be reallocated. That would only happen once the UK has definitively left the EU. However, election campaigns and candidate selection processes may have already begun in member states, adding a further headache to the calculation.

The question remains as to how the UK would conduct European elections if it remained a member state and what platform the parties would campaign on. Pro-deal, anti-deal, pro-second referendum, pro-hard Brexit?

An influx of 73 British MEPs would undoubtedly lead to a boost in the numbers of eurosceptics in the parliament, which is already going to rise with major gains expected in Italy, Hungary and France. Since the Conservatives no longer sit in the European People’s Party (EPP), that centre-right grouping would find itself even more diminished in size and strength.

A longer extension could also diminish the EU’s leverage. As Fabian Zuleeg and Larissa Brunner argue in a report for the European Policy Centre (EPC):"The Withdrawal Agreement has the best chance of getting through the UK Parliament if MPs face a binary choice, staring down the cliff edge: the deal, or a chaotic no-deal exit. Removing the immediate threat of no deal would mean giving up this leverage.

"If a longer, political extension is being considered in earnest, it is important that the EU27 accept the full consequences: a loss of leverage, and fuel to the Brexiteers’ argument that there is no real cliff edge; a toxic European Parliament election campaign in the UK with further political fragmentation; the re-opening of Article 50 discussions on issues such as the UK’s financial contributions and the backstop."

On Friday Michel Barnier, the EU’s chief negotiator, briefed member states on the extension issue.According to a source familiar with the subsequent debate, EU ambassadors pondered what kind of extension the UK might seek and why, and whether the EU should decide to offer only a one-off extension. There was no detailed discussion on what, if any, conditions might be attached.

Mr Barnier also updated officials on the other big issue this week:what legally binding changes the UK continues to seek on the Irish backstop.

The UK Attorney General Geoffrey Cox, and the Brexit Secretary Steve Barclay have been holding talks with Barnier. Their formal mandate, set down by Mrs May, is to secure legally binding changes to the backstop in order for the House of Commons to be able to pass the Withdrawal Agreement. London is still saying publicly that alternative arrangements can replace the backstop, and if not there should be a unilateral exit clause for the UK, or an expiry date.

On Tuesday Mrs May told parliament both sides had agreed to consider "a joint work stream" to develop alternative arrangements to ensure the absence of a hard border in parallel with the future relationship negotiations.

"Our aim is to ensure that, even if the full future relationship is not in place by the end of the implementation period, the backstop is not needed because we have a set of alternative arrangements ready to go," she told MPs.

However, that sense of purpose masks two facts: these activities do not replace the backstop, and the meetings in Brussels are making slow progress.

"What May said in the House of Commons is completely within the spirit of the backstop," says one EU official close to the negotiations. "There is already the possibility during the [two year] transition period to work on alternative arrangements that would supersede the backstop.

"What May said doesn’t contradict any of our expectations. There’s nothing in her statement which should worry the Irish.But the point is, you start a separate work stream to look at technology, you try hard to develop it, but the backstop is there and is ready to kick in if it doesn’t happen."

So far, the perception is that the discussions in Brussels have been about brainstorming and ideas. There is no draft text appearing, and there probably won’t be until the very last minute.

This is both because once a text does emerge it might leak, potentially railroading the process, and also the fact that, because the EU is sticking to its prohibition of a unilateral exit clause and an expiry date, the British team is struggling to secure the kind of changes that the DUP and hardline European Research Group have demanded.

"The lack of a text so far is just an acknowledgement just how deep the water is for the UK on this," says a senior Irish figure. "They’re acutely aware of the complexity of the mandate they’ve been given."

It’s understood that Geoffrey Cox has moved from seeking a termination clause to the backstop and an expiry date to seeking an arbitration clause that could be unilaterally triggered.

Michel Barnier is understood to have told EU diplomats that such a mechanism could not override the European Court or Justice’s ultimate determination over whether or not controls would or would not be liable on the Irish border in the event of a free trade agreement being concluded.

Furthermore, a key complexity is the absolute insistence that whatever Cox, Barclay and Barnier cook up, the EU will have to be sure that it can command a "stable" majority in the House of Commons, without it at the same time transgressing Ireland’s red lines on the backstop.

So far, Dublin believes those red lines - which the EU27 and the European Commission share - will be protected.

"There are no concerns about the direction of travel," says a key Irish figure. "It’s abundantly clear that we’re not going to accept a unilateral exit clause, or any soft dates or hard dates on exiting the backstop."

For that reason sources in Brussels are downbeat, given the narrow timeframe. "I don’t get the impression we’re getting close to any agreement yet," says one official. "I’m not so sure there is confidence on our side that this is going to pass in two weeks time."

If Cox does secure some changes, what form will they take?

Officials are exploring both the idea of some kind of additional text.So far the sense is it will focus on the temporary nature of the backstop. Officials are also looking at changes to the non-binding Political Declaration which could spell out how quickly both sides will move to conclude the future relationship.

The precise legal form of the additional guarantees is of keen interest in Dublin. In December the EU ruled out any extra legally-binding mechanisms. The Irish government is still adamantly opposed to any mechanism that would subvert the operability of the backstop.

It appears that the form will be determined by its content. A number of EU sources have insisted that the extra guarantees will not go very far beyond - if at all - the joint letter sent by Donald Tusk and Jean-Claude Juncker to Theresa May on January 14.

That letter reaffirmed the EU’s "commitment to work speedily on a subsequent agreement that establishes by 31 December 2020 alternative arrangements, so that the backstop will not need to be triggered."

The DUP and ERG have already said a letter will not be enough. The challenge is to give the content of the letter extra legal weight so that Geoffrey Cox can change his legal advice of 13 November, which stated that the backstop could keep the UK in a customs union with the EU "indefinitely".

According to one EU official: "We’re not in the business of contradicting the Withdrawal Agreement. We’re just contextualising it, providing more of a road map. It means we’re keeping our options open."

That means things remain fluid. Giving Cox the kind of text he needs to somehow convince enough Conservative and DUP MPs to embrace the Withdrawal Agreement will require exquisite balancing.

In other words, the stronger the text Cox gets, the weaker its legal form, and vice versa.

"Either he gets something with teeth, in which case we’ll be cautious on giving him something that’s got legal standing, or he if doesn’t get something with teeth, he’ll look for the best legal status for it that he can get.

"Because that becomes the sales pitch back home."

There has been some suggestion that the form could be a Joint Interpretative Statement.

In the negotiations to conclude the EU-Canada trade deal (CETA), both sides were forced to adopt a Joint Interpretative Instrument in order to win over the recalcitrant Walloon Parliament in Belgium.

The 12-page statement specified how various provisions of CETA should be interpreted, but it did not alter the text of the agreement.

"Nevertheless, it is a legally binding document according to Article 31 Vienna Convention on the Law of Treaties…," according to a paper on the CETA fix by the Centre for European Policy Studies (CEPS), "and will need to be taken into account by the Parties and members of the agreement’s Investment Tribunals during dispute-settlement procedures."

Dublin remains of the view that such a legal instrument is not entirely desirable. "Using that [joint interpretative statement] phrase is about five steps too far," says one Dublin source.

For some, the issue is not about the form, but about what it is that ultimately supersedes the backstop, given that this is the basket in which Theresa May is putting all her eggs.

"If it’s just to repackage what we already have in the Withdrawal Agreement and to reconfirm that the backstop is temporary, then fine," says one EU diplomat. "But temporary does not mean that we have an expiry date. An expiry date is the moment we have an alternative solution which has the same results [in avoiding a hard border].

"This is the problem. I’m afraid that the United Kingdom has not decided that they need to have a future relationship that achieves that result. Yet. We may end up there. We hope they will end up there. But they are still not there. And this makes it complex."

All this means that there is considerable nervousness in Brussels at how the last 27 days of Britain’s EU membership will unfold.

There is mounting speculation in Westminster that a significant number of Tory MPs will vote for the Withdrawal Agreement on March 12 since the alternative is now more likely an extension to Article 50 which could unravel Brexit altogether.

The EU’s preparation for No Deal is steadily increasing, even if European capitals will want to avoid it.The prospect of an extension may have diminished the chances of No Deal at the end of March, but it doesn’t remove the threat altogether.

"It’s extremely frustrating," says one EU diplomat."No deal is worrying. There are safeguards, of course.You could argue that you cannot have no deal by accident because you still have ways to avoid it. But we may end up with no deal, just not necessarily at the end of March."

That means that as member states get to grips with whether or not to grant an extension, and what it should look like, they are considering whether to offer one simply so as to avoid being blamed for a catastrophic No Deal.

In the meantime, member states watch and wait.The Barnier-Barclay-Cox discussions have entered quasi "tunnel" conditions .

"The gamble is that Mr Cox can get something that changes his legal assessment of the backstop," ponders one EU diplomat, " and that at least gives an excuse to as many MPs as possible to support the deal with a clear conscience, knowing that if things fall apart - as the Prime Minister herself said, in a rare moment of honesty - there may be no Brexit at all."