At 12 noon on Tuesday Theresa May called Jean-Claude Juncker to tell the European Commission President that she was backing a House of Commons amendment to replace Irish backstop.

President Juncker was amazed. According to a senior EU source briefed on the conversation, he told the prime minister that the deal could not be reopened, and that any trip to Brussels based on that expectation would be "pointless".

Undaunted, Mrs May returned to the business of whipping her MPs to support the amendment, sponsored by Graham Brady, chair of the 1922 backbench committee. The amendment declared that Parliament would pass the Withdrawal Agreement if the backstop were replaced with "alternative arrangements" to avoid a hard border on the island of Ireland.

Having declared on numerous occasions that the backstop was an unavoidable part of any Withdrawal Agreement, Mrs May was instructing her party to abandon it.

As in any good action movie, the faster we hurtle towards the finale, the more the protagonist is forced into performing ever more implausible nick-of-time manoeuvres.

In Dublin the reaction veered from amazement to exasperation to anger. Irish officials had been given no advance warning, and were reduced to watching events unfold on Twitter in real time. In a difficult phone call on Wednesday, the Taoiseach Leo Varadkar let his feelings be known.

"The Taoiseach told her, frankly, this is a bit much," according to a senior Irish official. "You’ve been batting for two years on this thing we’ve negotiated, and we’ve helped to deliver and shape it in a way that met with what you were looking for."

Mrs May told the Taoiseach in a matter-of-fact way that Parliament had rejected the Withdrawal Agreement, the EU had then said, tell us what the problem is, and Parliament then said the problem is the backstop. We are where we are.

"This is the British way," says the source. "You keep saying things a certain way, because to depart from them means admitting the inconsistencies."

There was, however, a cascading logic to the prime minister’s gambit, given her increasingly narrow operating space. The EU had indeed urged Mrs May at the European Council in December to show how she could deliver the House of Commons before making any more specific demands on the Withdrawal Agreement.

So, for the first time she could, with a magician’s flourish, brandish the mandate that had been missing: here is the parliament on a plate, all you need to do is get rid of the backstop.

Part of the gamble was to overturn the EU’s assumption, following the crushing defeat of the Withdrawal Agreement on 15 January, that Parliament’s resistance to the deal was about way more than the backstop.

Now she had a Commons majority saying that it was about the backstop. It had to go, or it had to be time limited, or the UK had to have a unilateral exit mechanism, or technology would have to be the way to solve the border question.

Theresa May once again demonstrated that party unity was paramount. This flows from a lifetime steeped in Conservative Party loyalty, and from a recognition of her own limited options.

"The political calculation is," says one British source, "as long as there’s no support for the deal from Labour, there’s no pathway out that isn’t occupied by DUP and Tory MPs. The problem with that is, they tend to be the ones making the biggest demands: going back to Brussels, ripping things up. So, you’re caught in a Catch 22."

Faced with that Catch 22, Theresa May pivoted to the Brexiteer right. Ahead of the vote Boris Johnson tweeted: "If the Prime Minister indicates in the debate that she will be pressing Brussels to reopen the WA to make changes to the backstop, I will gladly support the Brady amendment. But what we need is to achieve something legally binding... We can’t have some codicil or letter or joint declaration. We need to go back into the text of the treaty and solve the problem."

If the Prime Minister indicates in the debate that she will be pressing Brussels to reopen the WA to make changes to the backstop, I will gladly support the Brady amendment. But what we need is to achieve something legally binding - and that means part of the WA 1/2 — Boris Johnson (@BorisJohnson) January 29, 2019

But there was a further demand from the hardliners of the European Research Group (ERG). Mrs May would also have to support the so-called Malthouse Compromise.

"It is clear to me from talking to very hardcore Brexiteers," tweeted the Sunday Times’ Tim Shipman, "that if May endorses the Malthouse compromise that most of them will vote for the Brady amendment. ‘90% of the ERG will back it’ one of them said. What is the prime minister waiting for? Carpe Diem or bust."

What was the Malthouse Compromise?

Proposed by the Housing Minister Kit Malthouse, it was essentially three plans rolled into one.

Plan A was taking out the backstop and replacing it with "alternative arrangements". As the prominent Eurosceptic MP Steve Baker explained on Radio 5 Live: "It’s based on a free trade area in agrifood and goods, and it means there would be unlimited trade with no tariffs between the UK and Europe including Ireland. Lots of trade facilitations to make sure there are no checks on the border."

Plan B was that the UK would "purchase" the two-year transition period already negotiated with the EU as part of the Withdrawal Agreement so there would be no cliff edge at the end of March.

Plan C was based on a (widely debunked) interpretation of Article XXIV of the GATT trade agreement that would somehow allow the UK to trade tariff- and quota-free with the EU for up to ten years while a free trade agreement was being negotiated.

"This is the nature of compromise," Mr Baker said confidently.

"It is not a compromise at all. It's simply ditching the backstop"

The "compromise""was acquiring interest across the Tory spectrum.

The erstwhile pro-Remain health minister Stephen Hammond was said to be interested; Nikki Morgan MP threw her weight behind it.

Seasoned observers like Jill Rutter of the Institute for Government were struggling to make sense of it. "The idea that they will now reverse because 'soft Brexit' Conservatives have signed up to an ERG plan looks far-fetched," she wrote in a blog.

"But maybe a day of party unity is such welcome relief that the supporters do not care about the merits of the plan they are backing."

Needless to say the reaction in Brussels was one of disbelief.

"Insane," said one EU official. "It’s an absolute no-go. It doesn’t mean anything."

"I call it the madhouse compromise," said another senior EU diplomat.

"It is not a compromise at all. It's simply ditching the backstop. It is telling us, keep the standstill transition for the rest of your days in terms of trade, then we can discuss the future on WTO terms. This is not a compromise at all."

Listen:

Brexit Republic Podcast: Episode Twenty Five

Your Politics Podcast: Brexit and Children's Hospital

Nonetheless, on Tuesday afternoon Theresa May described the Malthouse idea as a "serious proposal."

In reality, Malthouse had simply co-opted a December paper by Shanker Singham, a trade and competition specialist at the Brexit-supporting Institute for Economic Affairs, which was primarily focussed on a Canada-style free trade agreement rather than the Irish border (the 59-page paper devoted only four pages to Ireland, and two of those were recitals).

"The backstop is part of the Withdrawal Agreement, and the Withdrawal Agreement is not open for re-negotiation"

British sources suggest that Mrs May’s "engagement" with Malthouse is purely tactical - to keep the ERG on board - and the paper will not be in her basket of demands when she returns to Brussels.

On Tuesday evening, meanwhile, the Brady amendment was passed by 317 votes to 301. Mrs May told the Commons she would seek "legally binding" changes to the backstop.

There was a swift and brutal response from Brussels. Within minutes there was a statement on behalf of Donald Tusk, the President of the European Council.

"The backstop is part of the Withdrawal Agreement, and the Withdrawal Agreement is not open for re-negotiation."

Even before it was clear that Theresa May would throw her weight behind the amendment there was frustration in Brussels that she was once again pushing the idea of a time limit, a unilateral exit button, and/or technology.

"The idea of a unilateral escape route, a time limit," Sabine Weyand, Michel Barnier's deputy chief negotiator, told an audience during a rare public appearance on Monday, "these were discussed during weeks, nights, weekends… The problem with the Brady amendment is, it doesn't spell out what those alternative arrangements are. We haven’t found them, and the UK negotiators have not been able to explain what they are. And that’s no criticism. It’s because they don’t exist.

"We looked at every border on this earth, every border that the EU has with a third country. There is simply no way you can do away with checks and controls."

When the Brady amendment did pass, EU officials were sceptical as to whether it did actually give Theresa May the mandate she was proclaiming.

The reference to "alternative arrangements" was vague, not least because the whole point of the backstop is that it is activated only if alternative arrangements don't work or aren't ready.

As such, competing elements in the House of Commons will draw contradictory conclusions from the amendment.

"Yes, she has a mandate to talk to us," says a senior EU source, "but she doesn't have a very crystal clear mandate on what to talk about, which is the eternal problem with the Brits. So, it's not a solid mandate. Nor is it a precise one."

Beyond the sense of anger at Mrs May apparently reneging on prior promises,officials in Dublin believe this is now a matter of trust and this in turn reinforces the need for a backstop.

"That’s what it comes down to," says a senior Irish figure. "That’s why we need the legal guarantee. It's one of those points that are self-evident. There's incredulity that she can just whip her party to vote against the thing she has said for the last two weeks is the only plan available. And there's the irony of the context of the issue itself: it’s all about trust."

Whether or not Theresa May was operating out of a sheer lack of plausible alternatives that would not split her party, the net effect is to place more pressure on Dublin. The amendment was designed to bring the attention back to the backstop, and, most probably, put more pressure on Leo Varadkar.

"The first half is to make it about the backstop," says the Irish source, "and the second half is to make the backstop all about Ireland."

As such, the Irish Government has had to adapt its messaging: the backstop is not all about Ireland, it's about protecting the EU’s single market.

How serious is the pressure now on Dublin, and how will the EU respond if and when Theresa May does seek changes to the backstop?

Opinion is divided. British commentary assumes that, when it comes down to it, the EU will blink and pressurise Dublin to move so as to avoid a no-dal Brexit.

Yesterday both the Daily Telegraph and the Daily Mail seized on a report by the German euro-critical IFO Institut calling for the backstop to be dropped and replaced by a joint EU-UK customs association with a mix of exclusive competences and the European Court of Justice remaining the final arbiter of disputes. This, said the Telegraph, would be resisted by EU trade officials who were the "shock troops" of the European Project.

While the institute does not generally reflect government thinking in Berlin, Irish officials are aware of concerns expressed in private about the impact of a no-deal scenario, and whether or not the EU’s sequencing - insisting on the Irish question being settled in the Withdrawal Agreement as opposed to the future trade relationship - was the correct one.

"That has been one of those things that’s been there for 18 months or more from Berlin," says one Irish official.

"It’s one of those worry points that you can’t do a lot about.It would be worrying if we didn''t hear it. People in Berlin and Brussels and other capitals and in Dublin are saying, what, if anything, could be done to find a way through that avoids a hard exit. It's what we all want to avoid. Nowhere more so than in Dublin."

For the moment, the Irish embassy in Berlin is not reporting back any concerns about a "wobble" in Berlin. If questions are raised, say officials, they are more often tinged with sympathy than impatience.

"I usually hear it more as an expression of sympathy rather than threat," says one official. "They are likely to say, we realise that either which way for you guys it’s horrendous. If you concede something on the backstop we can see all the horrible politics of that in Dublin. But also they realise that if Dublin holds on it could ultimately mean the thing going over the cliff, and that that’s the worst of all scenarios."

EU officials say the very vagueness of the Brady amendment reduces the risk of deeper cracks in EU unity.

"The amendment is all things to all people," says one official close to the negotiations, "but what it does do is it narrows things down to just the backstop. Do something on the backstop and we’re there. But because that something is so undefined, which is intentional, there's no sense of whether it’s drastic or benign."

Ironically, the very undefined nature of the Brady amendment will now allow both sides to sit back and wait. The EU has said, once again, the ball is in Theresa May’s court. Theresa May is likely to let the dust settle before going to Brussels, with officials remarking that making a sudden dash in the light of the dramatic events this week would not be the most politic of moves.

She and her team will also have to figure what exactly "alternative arrangements" should mean.

While Jeremy Hunt, the Foreign Secretary, told the Today Programme on Thursday that Mrs May would re-enter the fray by pledging unconditional support to the Good Friday Agreement and promising that the UK would not use the border as a backdoor into the single market, London insists the territory will rather be focused on getting an expiry date to the backstop and/or a unilateral exit mechanism (both resolutely ruled out by Dublin and Brussels); whatever gain is achievable will need to be legally robust.

"Whatever we ask for now we are into legally binding change," says one source. "Exactly how you do that I don’t think people are particularly clear."

However, such a ponderous approach will only fuel suspicions that Theresa May is deliberately running down the clock, both to keep pressure on her party and on Dublin.

But the Irish Government is doubtful that such pressure would yield anything that satisfies the hardliners. "If you’re right at the 11th hour," says one Irish official, "and someone said we just need some little bit of comfort language or reassurance, of course there might be space to do something like that, another clarification letter or a paragraph in the Political Declaration.

"But you would be talking about some comfort factor - not a change to the backstop."

For now, there will only be tentative contacts between London and Brussels. The spotlight meanwhile is on Theresa May’s approach to the Labour leader Jeremy Corbyn. Mrs May’s team knows she will need Labour votes to get her deal across the line. The calculation so far has been that while the Labour front bench won't support her, enough MPs from Leave-voting constituencies might, especially if they take up her offer of cash for their constituencies.

Corbyn dropped his precondition that the prime minister take no-deal off the table, but he is still pushing a permanent customs union as a way to avoid the backstop.

"If Labour sets out its price for supporting a deal – for example a permanent customs union and ‘dynamically’ following EU rules on worker protections and environmental standards – it has the chance to split the Tories and avoid sharing the blame for a no deal Brexit," writes Paul McGrade, a former foreign office and European Commission official, now based with the consultancy firm Lexcomm, in a note to clients. "But any choice splits Labour too."

Leave-supporting Labour MPs now routinely flout the party whip on Brexit. At the other end of the spectrum, there is a cohort of MPs keen to move to a second referendum.

This means that Theresa May’s strategy to run down the clock, if that is indeed her plan, carries its own risks.

If she returns from Brussels in mid February, with little more than another written assurance, or even something with stronger legal weight, she will still not win over the DUP and ERG. And those five amendments which were defeated on Tuesday night could make a comeback, notably the ones pushing for an extension to Article 50 or a second referendum.

In the high noon of early March, and with precious few options left standing, the action movie, with its bloodied and bruised cast, could go either way.