Arlene Foster’s sudden resignation as leader of the Democratic Unionist Party and First Minister of Northern Ireland is the latest sign of how long a shadow the Protocol is casting over Ulster politics.

Whilst it isn’t the only thing that seems to have motivated the party to oust her – critics are also citing a decision to abstain on a vote on gay conversion therapy – it almost certainly played the decisive role.

Having been DUP leader throughout the Brexit process, Foster seemed initially disposed to try and own the outcome and make the new checks in the Irish Sea work, an outlook she would have shared with Michael Gove.

But the scale of the unionist and loyalist backlash against the ‘Sea Border’ has put paid to that, and the DUP are now scrambling to avoid haemorrhaging voters to more hardline parties at the next Stormont elections. Jim Allister and his hard-line Traditional Unionist Voice (TUV) are well positioned to attack the DUP on this flank, and public anger is such that their usual defensive position (that splitting the unionist vote might let Sinn Fein claim the First Minister’s office) may not fly.

Given that the DUP, like Sinn Fein and the SNP, has traditionally had the culture of phalanx-like internal discipline that seems a hallmark of nationalist parties, those behind the putsch must have feared a truly dire electoral reckoning if action wasn’t taken.

Moreover, many senior DUP figures will be uncomfortably aware of the historical precedent, for such is pretty much exactly the same fate they inflicted on David Trimble and the Ulster Unionists after the latter did the heavy lifting to secure the Belfast Agreement. The rise of the DUP by contrast was followed by the St Andrews Agreement, which is widely regarded as having turned out to be a step backwards. Will history repeat itself with the TUV?

According to the Daily Telegraph, ministers are unenthusiastic about the prospect of a new DUP leader, who they expect will take a much harder line on the Protocol. But in theory at least the Government has already accepted the need for fundamental reform – that was the logic of David Frost’s appointment as explained to me last month.

The even more serious question is what happens to Northern Irish politics. Whilst a new and more hard-line leader could staunch the flow of voters to the TUV, it might also alienate more moderate voters who have rowed in behind the DUP as it cemented its position as the dominant Unionist party. In recent history this would almost certainly have profited the Alliance Party, but given that liberal unionists share many of the same concerns over the Protocol and a one-sided reading of the Belfast Agreement. So it could create an opening for the Ulster Unionists or even – with enough work, money, and time – the Conservatives.

But the devolved institutions could be on the line. One of the DUP’s most effective tactics for corralling pro-UK voters into their camp has been the fear that a divided unionist vote will see Sinn Fein win the First Minister’s office. Whilst this logic has helped to keep Ulster’s politics stuck in the sectarian cul-de-sac, there is truth to it. Would the DUP, under a more hard-line leader, consent to serve as Deputy First Minister. The alternative could be unionists doing what Sinn Fein did a few years before and bringing down Stormont, and this time it might not come back.

Of course, we should not rule out another possibility. Until just a few years ago the combined unionist parties had a fairly secure majority in the Assembly. Those voters haven’t all died or turned suddenly into nationalists, and circumstances may give the DUP a chance to lure them back.

During the negotiations that saw Stormont given an opportunity to reject (most of) the Protocol, the Irish/EU side insisted that it not be done on a cross-community basis. So long as unionists are in the minority, this will prevent them blocking the Protocol on the basis of their community vote alone. But in the event that they were to regain the majority they held only a few years ago, it means they could set it aside in the teeth of Sinn Fein’s opposition.

‘Unionist unity’ is a self-defeating long-term strategy. But it can deliver results in the short-term. A united anti-Protocol front might be the DUP’s best chance of retaining the leadership of unionism – regardless of the headaches it causes in Dublin, Brussels, or London.