The European Union might have many flaws, but one of its great strengths is its ability to sense weakness. It is telling, then, that Michel Barnier didn’t mince his words on his trip to the Irish border this week as he made the case for a goods border in the Irish sea. This is something that Theresa May has said no British prime minister could ever accept, and it’s anathema to most of her cabinet colleagues, not to mention the Democratic Unionist party’s MPs on whom she relies for support. So why would Barnier return to this theme? Because even from Brussels, it’s clear what a bind Mrs May is in.

Not so long ago, she was hailed as the indestructible Maybot: the queen of all she surveyed. Now, she is so weakened that she is having not just to accommodate her antagonists but to promote them. Take the appointment of a new home secretary. She has clashed repeatedly with Sajid Javid over the years: he doesn’t share her views on immigration, or a host of other major issues. Amber Rudd might have disagreed with May on various things but felt she had to toe the line, that the price of admission was continuing May’s legacy at the Home Office. Now, ministers know that they don’t need to pay that price. In his first day in the job, Javid cheerily declared that he’ll be his own man.

May finds herself being pinned down not only by Barnier and Javid, but a host of others too. The House of Lords, Tory rebels, Brexiteer cabinet ministers and the DUP are all at it. The Tory Eurosceptics even published a 30-page dossier attacking her idea of a hybrid customs union. The Prime Minister’s challenge used to be deciding which way to move. Now, she will be wondering if she can move in any direction at all.

The government this week lost its ninth vote in the Lords on its latest Brexit bill, and it’s starting to matter. One of the amendments passed this week would take ‘no-deal’ off the table and enable parliament to send the government back to the negotiating table if it was unhappy with the agreement reached. This removes May’s bargaining power and encourages the EU to cause all sorts of mischief, playing parliament off against the executive. One influential Tory peer tells me that the Lords is becoming more assertive because of May’s weakness: it senses that the government doesn’t have the numbers in the Commons so more of its amendments are likely to survive.

And this is another problem for May: even the House of Commons is becoming less biddable on Brexit. Tory MPs who a few months ago had effectively given up on trying to substantially soften Brexit are now preparing to do just that. Their aim is to defeat the government on the issue of ‘a customs union’ with the EU after we leave. I understand that when the whips have tried to talk these rebels round, they have received short shrift. Julian Smith, the chief whip, has warned cabinet colleagues that he doesn’t have the votes to defeat a customs union amendment.

This, in turn, has made Brexiteer cabinet ministers more fretful than at any other point in the process. Once they believed in No. 10’s grip on the process. Now they don’t. At the time of the December deal, May’s political team gave Brexiteers various assurances about what the agreement committed the UK to. These assurances haven’t held up. Ministers don’t believe they were deliberately misled. Rather, they think that No. 10 is being moulded like playdough by the civil service, which is guiding May towards its preferred outcome.

Hence the concern about the influence of Olly Robbins, the PM’s chief Europe adviser, who is telling ministers what the EU will and won’t accept. They are beginning to wonder whether his advice is truly impartial — or simply a summary of the kind of deal the civil service wants. As one well-connected Brexiteer warns, May ‘is asking people to take a lot on trust from him’.

Scepticism is also growing around her proposal for a hybrid customs partnership with the EU. May describes it as the ideal compromise, maintaining frictionless trade but allowing Britain to strike its own trade deals. It’s a complex idea that would see the UK set its own tariff rates, while collecting tariff revenues on the European Commission’s behalf. But can it ever work?

It seems unlikely. Either the UK will waste so much negotiating time pursuing this idea that it won’t be ready to leave the customs union by the agreed deadline of December 2020 — or the EU will string us along. They might eventually agree to May’s proposal but will then declare that the technology won’t be ready in time — forcing the UK to stay in a de facto customs union. Tellingly, officials from Her Majesty’s Revenue and Customs are already admitting, internally, that the UK end of the system won’t be ready until 2022.

In advance of a crunch meeting of the Brexit inner cabinet this week, HMRC officials were dispatched around Whitehall to try to win ministers around. Their efforts were unsuccessful.

No wonder Brexiteer Tory backbenchers are becoming more agitated. Once again, pointed references to the 48 letters needed to trigger a vote of no confidence in a Tory leader are being made. This group hasn’t yet lost faith in May — their ire is largely directed at her advisers. But the European Research Group, the leading Brexiteer lobby in the party, is making clear to the PM that they couldn’t back her if she pushes ahead with the customs partnership idea.

If this wasn’t complicated enough, we then have the Democratic Unionist party. They paint their red lines in bright orange, and will not accept any kind of special deal for the province. May knows that if she tries to solve her problem by agreeing to Northern Ireland staying in the customs union while the rest of the UK goes its own way, her Commons majority will disappear. And not just on Brexit, but every other issue too.

A prime minister at the height of his or her powers would find this hard to deal with. May might find it impossible.

It is now painfully obvious that May’s big mistake was to trigger Article 50, and start the two-year negotiation countdown, before working out what kind of relationship with the EU she wanted. It is as remarkable as it is depressing that, with less than a year to go until Britain formally leaves, the Brexit inner cabinet is still debating what kind of customs arrangements the UK should be seeking. If the government had seriously and visibly prepared for no deal, the EU would be far more concerned about the UK walking away from the table. As it is, the EU is understandably confident it can squeeze Britain without collapsing the talks. If May has to sign, then why not?

Those close to the process believe that the most likely outcome now is for the UK to offer to essentially stay in the single market for goods: the so-called Swiss option. This, combined with the hybrid customs model, would — if the EU accepted it — solve the Irish border issue.

No. 10 has already started to paddle in this Rubicon. The Mansion House speech essentially advocated staying in the single market for pharmaceuticals, chemicals and aviation. Extending that to all goods is not much of a shift. As one of those briefed on the new customs partnership explains, ‘unless you’re in total regulatory alignment with everything that goes through that border then you don’t get frictionless trade’. But the problem with this approach is that it is hardly taking back control. It would leave the UK as a rule taker and it is hard to see how Tory Eurosceptics from the cabinet down could accept it.

For now, the government focus is on getting the EU to look sympathetically at its ‘customs partnership’ plan. I am informed that No. 10 is being urged to hold a parliamentary vote on the plan before the June EU Council. The thinking is that if the Commons backs the plan, it would show the EU that Britain is serious about the idea. At the same time, senior government figures hope that the vote on the customs partnership might be enough to win over some of those Tory rebels currently planning to amend the trade bill to back a customs union with the EU. In a remarkable turnaround, the Tory whips and Downing Street are now more worried about the Tory pro-Europeans than the Tory Eurosceptics.

This could change quite suddenly. If one of the cabinet Brexiteers resigns over the directions things are going, that would be seen by many on the backbenches as the signal to trigger a leadership challenge. Alarmingly for May, the resignation of one of these ministers is now more likely than it has been at any previous point in the process. David Davis, the Brexit Secretary, is becoming increasingly exercised by how Olly Robbins is handling the negotiations. Davis feels emboldened in his criticisms as his concerns about the backstop agreed to in December have been borne out by events. Boris Johnson is telling friends with increasing regularity that the government’s approach is not delivering the kind of Brexit he wants.

May must find a way to slip these bonds. It is tempting to say that she shouldn’t start from here. But she is where she is. Some think that only boldness will get her out of trouble, but such an approach is not in her nature. Boldness would require the UK making clear that it is getting ready to walk away from the negotiations — tricky, given the inadequacy of the government’s ‘no deal’ planning. Those around May also fear that such an approach would spook business, hit economic confidence and risk a parliamentary uprising.

However, as one senior Tory backbencher warns, for May to pursue a deal based on a complex customs partnership and the UK essentially staying in the single market for goods would be ‘very, very dangerous’. It is easy to imagine how this would bring forward a challenge to her leadership. Indeed, it isn’t hard to see how there could be a constitutional stand-off as you couldn’t get to be leader of the governing party without taking a position on Brexit that can’t command support in parliament.

The Brexit process has reached points of high drama before, and then everything has calmed. It is tempting to imagine that these latest troubles will resolve themselves too. But the difference is that now things need to be put into a legal text, making it far harder to fudge matters.

May has, with some skill, used ambiguity to keep this process on the road at home and abroad. Ambiguity though delays problems rather than solving them — and the road is running out.

Ministers think that No.10 is being moulded like playdough by the civil service

Spectator.co.uk/podcast James Forsyth and Chris Wilkins on a prime minister under attack.