It comes as no surprise that the EU withdrawal negotiations are going to the wire on the Irish border. That’s because hardline Tories are actually demanding Theresa May ignore legal commitments she has already made – and that even they went along with. This issue has flared up again today because Democratic Unionist party leader Arlene Foster has claimed the prime minister is “wedded to a border down the Irish Sea”.

Neither Jacob Rees-Mogg nor the DUP have ever had a workable alternative plan for the Irish border

Last December Britain and the European Union agreed an insurance policy (termed the “backstop”). This was backed by the DUP, it should be remembered, and was a mechanism to ensure that, in all circumstances, there would be full alignment on both sides of the border with those rules of the EU internal market and the customs union that support north-south cooperation, the all-island economy and the protection of the 1998 Good Friday agreement.

In plain terms that means that whatever else happens over Brexit, the Irish border must remain as it is now and has been for quite a while: open, invisible and free of any tariffs, checks or security barriers, for people, livestock, trade or services. Which in turn means common regulations, common standards and upholding rules of origin to prevent smuggling of goods – the very EU requirements so hated by people such as Jacob Rees-Mogg because, they insist, these would still tie the UK to Europe.

The problem, however, is that neither they nor the DUP have ever had a workable alternative plan for the Irish border. And meanwhile they have nodded through May’s deals as she has repeatedly postponed the crunch decision now confronting everyone.

But what else do they think they all signed up for? In March, the prime minister wrote to the president of the European council, Donald Tusk, pledging that a legally operable version of the backstop would be agreed as part of the withdrawal agreement. And, at the same time, the British and EU negotiators published a joint document that indicated a backstop solution would apply “unless and until another solution is found”.

Neither in the December nor the March texts are there any references to “time-limited” backstops now demanded by half of May’s cabinet, most of her MPs and the DUP. But since the backstop that the UK has already agreed to is designed to operate in all circumstances, how can it possibly be time-limited?

Both the EU and Ireland have indicated there must be a legally sound backstop arrangement to be included in the withdrawal agreement. They are quite correct to insist it cannot be fudged nor temporary. It is not EU intransigence but London’s reluctance to abide by what it has already agreed with Brussels that is gridlocking the negotiations.

And it is also what it has enshrined in legislation. Section 10 of this year’s European Union (Withdrawal) Act rules out measures that create border arrangements “which feature border infrastructure, including border posts, or checks or controls, that did not exist before exit day and are not in accordance with an agreement between the United Kingdom and the EU”.

DUP accuses May of breaking Brexit pledge over 'Irish Sea border' Read more

That part of the law now has to be fully delivered by the prime minister – or she would be acting illegally.

For Boris Johnson, Rees-Mogg and their sizeable group, the Irish border is tiresomely frustrating. They have said publicly that it shouldn’t matter a fig and never be an obstacle to their obsession with a Brexit at any price. It frankly beggars belief that the DUP would hitch themselves to a wagon driven by Little Englanders who know little about issues on the island of Ireland and care even less.

Surely, given recent history, nothing – nothing – is more important in all the government’s many duties and responsibilities than maintaining peace and continued progress on the island of Ireland? It was so hard won, over so many decades of tough negotiations plagued by successive crises.

Yet now that Good Friday peace process is at risk from Brexit, compounded by the near two-year suspension of the Stormont legislature and assembly.

Theresa May should reject factional party dogma, stick with what she has already agreed with the EU, and abide by legislation she enacted earlier this year to guarantee the current open border. Then a deal with the EU might follow, and stability on the island of Ireland can be maintained.

• Labour peer Peter Hain is a former secretary of state for Northern Ireland