Theresa May’s desire to combine exit from the EU’s customs union with an invisible border in Northern Ireland is not in doubt. The issue is not how much the prime minister wants a solution but whether a solution exists. Without one, Mrs May’s entire Brexit strategy unravels.

Downing Street has been working on technical solutions to this problem, fleshing out formulas described by the prime minister in a speech last month as “a highly streamlined customs arrangement” or “customs partnership”. On Friday, it emerged that those proposals have been flatly rejected by the European commission as unworkable, both from a legal and a practical perspective.

The EU has sent No 10 back to the drawing board and there is not much time to draw up something new. An obvious solution is to grab a template that has already been drawn: accepting that the UK and the EU will, after all, end up in a customs union.

This week the House of Lords amended the Brexit withdrawal bill with a clause directing the prime minister down that path. The pressure will increase next week with a cross-party motion in the Commons urging the government to seek a customs union in negotiations.

Hardline leaver MPs resist any compromise in that direction, seeing it as a dilution of Brexit’s essential purpose – sovereignty over trade. Customs unions have common external tariffs and limit the capacity of participating states to strike bilateral agreements. Existing EU variants of the model, such as its partnership with Turkey, involve ceding rights to Brussels without equivalent representation, in ways that even advocates of a soft Brexit find unpalatable.

The Labour view is that the size of the UK economy and the other benefits it brings to European wellbeing – its security capacity, for example – would encourage the EU to grant unique privileges that make a customs union more attractive. That is not so very far removed from the government’s claim that the whole EU-UK trading framework can be “bespoke” – tailored to British specialness. Mrs May has not had much luck translating that principle into actual privileges. It is reasonable to ask why Labour thinks its approach would be more effective.

One difference is that the opposition envisages negotiating enhancements to a recognised model: the customs union. By contrast, Mrs May is trying to reach for special favours from behind red lines that deny her an institutional template for a deal. Also, she is negotiating against a howling chorus of Europhobia from her own party, which corrodes goodwill in Brussels. The EU side was always going to be legalistic – that is in the nature of a negotiation that must accommodate the interests of 27 countries and respect existing treaties. But the commission has been made even less flexible by Tory noises off, which hint at readiness to disregard existing rules and boasting that no deal is required.

It is important to recall how Mrs May came to her current impasse. The commitment not to erect a hard border in Northern Ireland reflects recognition that doing so would sabotage a social and political compact put in place by the Good Friday agreement. Brexiters ignored that hazard during the referendum and have belittled it ever since. Their pursuit of the ideological chimera of absolute trade sovereignty blinds them to the reality of a fragile peace treaty that demands respectful, judicious handling.

The UK staying in a customs union with the EU would not dissolve the border issue in one move, but it is the simplest step towards a solution.

But the lesson of the past week for Mrs May goes beyond the technicalities of cross-border trade. It is that her whole approach to Brexit has been formed in deference to a faction that has pretended – often cynically – that insurmountable obstacles could be swept aside. Her negotiation is based on fantastical precepts of diplomatic alchemy. Inevitably, the EU is not taking her base metal for gold. The prime minister has followed bad advice with stubborn dedication. Time is running out and parliament is offering her another way. She must take it.