The victorious challenge against Theresa May by hardline eurosceptics this week is a decisive moment in the negotiations.

"This is an inflection point," says a source close to the British negotiating team. "This is no longer about technical solutions. It has become a matter of high politics."

The showdown with the European Research Group (ERG), led by arch-eurosceptic Jacob Rees-Mogg, also reveals some startling things: the first is that her so-called customs partnership would have kept Britain de facto in the customs union well beyond the two-year transition period.

The second is a manoeuvre by London to reinterpret the backstop solution for the Irish border contained within last December’s deal between the EU and UK.

Ostensibly, the group of 60-odd Tory eurosceptics laid down the gauntlet over the Prime Minister’s preferred solution to the Irish border dilemma.

Let’s remind ourselves about what the customs partnership means (this is a very basic explanation).

At present, the EU, including the UK, has a single trade policy.

This requires a perimeter around the EU – goods from the outside world attract a single tariff to enter that perimeter, but once inside those products can circulate within the single market.

Because of the single commercial tariff for the customs union as a whole, the European Commission operates a single trade policy, negotiating trade deals around the world on behalf of member states.

The customs partnership, according to its architects, would mean the UK mirroring what currently exists, except that Britain would have its own trade policy, with its own tariffs on goods coming from outside.

It would work by the UK applying the same tariff as the EU, but then refunding exporters from third countries if the products remained in the UK.

For goods that went on to the EU, via the UK, London would have to ensure they were subject to the full EU tariff.

It would mean the constant tracking of goods involved in supply chains between the UK and the EU to see where the EU tariff applied, and where the UK tariff applied.

The solution was first tabled as a UK position paper last August entitled Future Customs Arrangements: A Future Partnership Paper.

Its authors admitted the idea was "untested" and "innovative", but from a UK point of view, it would mean no hard border.

That’s because there would be no need to check goods going back and forth across the land border, as the goods from outside the EU would have already been checked when they entered the same perimeter that exists at present.

Fast forward to the Brexiteer challenge.

The puzzling thing for many observers is that the customs partnership idea had already been rejected by the EU.

The European Commission Task Force famously dismissed the August paper as "magical thinking".

So why has it still been in the frame?

In December, the UK and EU agreed the Joint Report containing the backstop of Northern Ireland remaining in the customs union and significant parts of the single market.

In February, when the EU first converted the Joint Report into a stark legal draft, it was rejected out of hand by Theresa May.

She was then invited to come up with a credible alternative, and to do it quickly.

What is now clear is that Britain was largely repackaging what had already been rejected in August in the hope that the customs partnership could somehow persevere.

But by mid April the Task Force was losing patience.

The idea was just too complex. It would place too onerous a burden on the EU and on traders, and it would probably fall foul of WTO rules.

So, why did Jacob Rees-Mogg and the ERG issue such a terminal challenge against Number 10 over an idea that was doomed anyway?

Sources now suggest that the customs partnership is a subterfuge for something else, something that would bind the UK much more closely to the EU than what the Brexiteers are prepared to stomach.

The ERG (correctly) smelled a rat.

Since last summer British officials had boiled their response down to two options for avoiding a hard border: the customs partnership, and what is called maximum facilitation (or Max Fac).

The latter is the hard Brexit way of solving the problem. Technology, pre-notification of documents, customs exemptions for SMEs and fast-tracking for Approved Economic Operators (AEOs), or large "trusted traders," would all be deployed to avoid - or minimize - friction both on the Irish border and at UK ports.

Such a solution involves infrastructure, no matter how technological, so it is not acceptable to Ireland or the EU.

But it would also mean the UK diverging from the EU’s rulebook for standards on goods, chemicals, food products and so on. It would mean border checks at Dover-Calais, but this is something Brexiteers can live with if it means a clean break.

Both options are gateways to two competing visions of Brexit.

The point about the customs partnership is that, over time, it would mean continued de facto membership of the customs union.

Theresa May has consistently rejected such a scenario as a betrayal of Brexit voters, so she could not admit publicly that that was what she was prepared to accept over time.

But she has been holding out hope that the customs partnership idea, or something like it, would be grudgingly accepted by the EU.

If only the EU would agree to appropriate mechanisms for ensuring that the correct tariffs were paid and that exporters were reimbursed – then some way down the road, Brexit Britain could enjoy the Holy Grail of an independent trade policy while still avoiding border checks.

In other words, the British prime minister has been taking the very long view.

It may take 10 to 15 years for this to work, the argument goes, but it would be worth it, because at that point Global Britain emerge from its post-Brexit cocoon to spread its trading wings.

But why would this idea be so repugnant to Brexiteers?

On BBC Radio Four’s The Today Programme, the day after the ERG issued a 30 page report warning Theresa May not to go for the partnership model, Jacob Rees-Mogg clashed with fellow Tory MP Vicky Ford over what it actually meant, and whether or not it would keep the UK in the single market, not just the customs union.

Ms Ford insisted it did not keep the UK in the single market, nor did it prevent the UK from diverging from the EU’s regulatory sphere. "Jacob," said an exasperated Ms Ford, "that is not what the customs partnership is. That is not what is being discussed. There is a clear understanding that the UK will be able to diverge."

Rees-Mogg shot back: "If goods come into this country in a single point where they can then go freely on to the European Union with only an adjustment in the tariffs that means they must meet EU regulations. Therefore we are bound by the rules of the single market.

Rees-Mogg hit the nail on the head. According to well-placed sources, the customs partnership idea does requires high alignment with the EU legal order, and not divergence.

How do we know this?

Because of an unmistakable, and quite bold, change in tack by British negotiators in recent weeks.

To explain this, we need to go back to the Joint Report.

The key paragraph (49), setting out how Northern Ireland would remain in the customs union and single market (if no other solutions were found), includes the following:

In the absence of agreed solutions [ie, solutions that might be found through the future trade agreement], 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.

At the time, the whole world saw the line "the UK will maintain full alignment" as relating exclusively to arrangements for Northern Ireland (indeed Paragraph 49 comes under the heading Ireland and Northern Ireland).

However, British negotiators have begun to retroactively reinterpret that key line as applying, not to Northern Ireland on its own, but the UK as a whole.

In other words, if the other ways of solving the border, ie through the future trade relationship and technology (options A and B) don’t work, then all of the UK will align "with those rules of the Internal Market and the Customs Union etc…).

But how does this square with the British government’s own proclamations that it would not have to stay aligned with the EU into the future?

Didn’t Theresa May’s cabinet, shortly after the Joint Report was agreed, come to a consensus on what was called "managed divergence" from the EU?

The answer lies in the clever linkage between the customs partnership idea and Paragraph 49.

Effectively, London is saying, "allow us to interpret Paragraph 49 in its most literal sense (‘the United Kingdom will maintain full alignment…’) and that will allow us to avoid a hard border and guide us into this future customs partnership idea."

The important point to remember is that avoiding a hard border in Ireland is not just about avoiding customs checks.

It’s also about avoiding the need to check if goods coming in to the island of Ireland properly comply with EU standards and regulations, especially those rules relating to animal health, food safety and plant safety.

"If you go down the new customs partnership and you genuinely try to have no border process at all, that means you have to have high alignment of goods and agri," explains one source close to the negotiations.

"Because you don’t want to have any border process at all, even behind the process of customs." In other words, behind the headline mechanics of the customs partnership idea there is the assumption – indeed the necessity – of high alignment of standards and regulations.

That is why the customs partnership, and all that it would entail, cannot be accepted by the Brexiteers.

The other assumption, which sources close to the negotiations have confirmed, is that either option – a customs partnership or maximum facilitation – will take years to set up.

That would mean, in effect, Britain having to stay in the customs union well beyond the transition period in order to allow time for the technology and mechanisms to be put in place.

Theresa May, it is understood, is well aware of that, but regards it as part of her pragmatic, long game approach. Under the Max Fac option Britain would have to stay in the customs union anyway, to avoid chaos at ports, so we might as well stay in it via a customs partnership, is the logic.

The other attraction to London using Paragraph 49 is that the alignment would be necessarily selective.

The Irish backstop idea is, strictly speaking, for goods. The full alignment, as mentioned in Paragraph 49, would be with the EU’s rule book on the movement of goods, so there would not have to be checks on those goods at the border.

There will be alignment on selected aspects of the single market, on agrifood rules, on energy, and so on, but not wholesale alignment with the single market acquis [EU body of law].

So the advantage for the UK would be that the Paragraph 49 magic bullet does not commit Britain to full alignment.

In particular, services are not included in the backstop.

This is a major attraction for the UK. Even if the UK were not able to strike free trade deals in goods because of the need to stay aligned with EU regulations, it could strike its own free trade agreements for its huge and growing services sector.

So, could, then, the customs partnership plan, as a metaphor for the UK staying de facto in the customs union, still win over the EU if the destination turns out to be the UK remaining economically close to Europe, and close in terms of the EU rule book?

Officials on the British side are convinced that it could. They are relying on what they regard as "thoughtful" and "political" figures high within the EU institutions and capitals who just want the problem to be fixed.

"It’s an open secret that they want the backstop for the whole of the UK," says one EU source, "which means effectively the whole of the UK staying within the single market with regard to goods, and not services – because that’s what the backstop is. It’s goods and not services, with other bits and pieces."

There is also an implied flip side.

If you don’t reconsider the customs partnership, the argument goes, then the crazies of the ERG will take over, and then you’re facing something worse.

"If the customs partnership doesn’t work," says one British official, "then you have most extreme form of political crisis: no deal. The [Irish] backstop is [then] totally irrelevant. The backstop doesn’t exist in a no deal scenario."

The view from Dublin and Brussels, however, is much more circumspect.

The major problem with the new interpretation of Paragraph 49 is that it attempts, at a stroke, to fix the UK’s long term future relationship with the EU through a fairly transparent sleight-of-hand.

In other words, officials suspect the Irish border being used as a backdoor into a free trade agreement, when the backstop is strictly a Withdrawal Agreement issue.

This is going down very badly, both in Brussels and other member states.

"Every other member state just laughs at that," says a source. "As the [European] Council legal service put it, how could anyone believe we would have negotiated the future framework for the EU-UK relationship through a protocol on Ireland, attached to a Withdrawal Agreement?

"If you look at the whole sequencing logic of this, how could they possibly have agreed the EU-UK relationship like that?"

The other problem is that Theresa May’s strategy is a wing and a prayer when all Dublin, and the other 26 capitals, want is certainty, nearly two years since the referendum.

"All this is just a big, messy, stewy uncertainty," says one Irish source. "And in the end we need certainty. [The customs partnership idea] is so unattractive.

Again the British are saying, we kind of like a customs union but we’re going to call it a customs partnership, oh and it’s only temporary, oh, and we’d like a role and decision making on trade policy, and everyone’s like, forget it."

Where does that leave the negotiations?

On Wednesday the British cabinet sub-committee on Brexit narrowly rejected the customs partnership idea, so for now it seems to be off the table.

The official line from Downing Street is that work is continuing, but one British official ruefully admits that technical tweaking to the customs partnership is pointless. "Officials can do more work, but it’s not about more work. It’s now a political problem."

MPs are expected to debate an amendment on keeping the UK inside the customs union in the coming weeks. Tory whips had thought to turn that into a confidence motion on Theresa May; after Wednesday’s show down they may not be so sure.

Having tried – and failed – to pursue a customs union dressed up as a customs partnership, desperate pro-European Tories might decide to bite the bullet and vote for the out-in-the-open customs union amendment in the House of Commons.

"It depends what way they play it," says an Irish source. "They can play it in sorrow rather than anger. It’s going to be a very, very difficult moment. They might try to use Northern Ireland, as in, ‘we’re only doing this to solve the Northern Ireland issue, because this will help solve it.’"

A British source has reservations. "It’s not an option anyone in Number 10 really likes. Theresa May won’t want to be defeated in the House of Commons on a flagship issue."

In reality, with the customs partnership option apparently gone, there is precious little else for the UK to offer.

If the hard Brexiteers seize control of the ship of state and steer it towards the "no deal" rocks, some in Dublin will regard that with grim stoicism.

"Let them threaten, let them go through that," says one exasperated official. "Let us all know that that’s what’s on offer. But let us do that now, and not in October. Fine, pull it all down, say we’re going to walk away with no deal, put in Jacob Rees-Mogg and then we’ll all make our decisions."

In the meantime, the government is determined that the backstop be given full legal effect and embedded within the Irish protocol that will be attached to the Withdrawal Agreement.

That will be a solemn, legally-binding, international treaty. It may require legislation in the UK and in Ireland. And it will require a massive political effort to reassure unionists.

Michel Barnier’s trip to Dundalk, Derry and Dungannon earlier this week was part of that effort. There was outright hostility within the DUP to his visit, with Arlene Foster accusing Mr Barnier of "aggressive" tactics.

There was, however, a conciliatory editorial in the Belfast Telegraph on Wednesday. "Mr Barnier's approach seems eminently sensible," the paper opined, "and he states bluntly: ‘My job is to ensure that the entire UK leaves the EU in an orderly fashion, rather than in a disorderly fashion.’"

The EU Task Force now believes that when the dust settles from the customs partnership detonation, the obfuscation and phoney war may make way for a more honest debate. Dublin also believes that, in order to solve the hard border issue, continued membership of the customs union is the only way.

MaxFac is welcome so long as it is placed on top of membership of a customs union, and not an alternative to it.

On Wednesday, Mr Barnier addressed a meeting of EU ambassadors. To counter UK arguments that the backstop is a land grab of Northern Ireland, he is understood to have spelled out how there are French immigration officials operating in Eurostar in London, and likewise UK officials in Paris, Calais and Brussels.

These are pragmatic and agreed solutions and they do not impinge on sovereignty, he said. The Irish backstop solution, with Northern Ireland remaining in the customs union, he argued, should be no different.

But Brexiteers and the DUP still profoundly disagree.