SO inevitable was the fall-out of Theresa May’s proposed deal on Northern Ireland that it is hard to see how the UK Government thought it could get away with it. Just as the negotiations appeared to be reaching a conclusion, the DUP applied the brakes. It was a disaster for the Prime Minister’s already shredded authority and the long-term prospects of a Brexit deal, but it is also troubling that no one appeared to consider one of the most obvious problems: the consequences for Scotland.

Those consequences became obvious almost as soon as the deal emerged. According to the draft, there would be “regulatory alignment” between Northern Ireland and the Republic, but Nicola Sturgeon wasted no time in saying that if a special deal was possible for Northern Ireland, then Scotland should get one too.

Now a further challenge to Mrs May has come from within her own party, with the leader of the Scottish Conservatives Ruth Davidson saying that those who supported Brexit were not voting for different deals for the home nations. “If regulatory alignment in a number of specific areas is the requirement for a frictionless border, then the Prime Minister should conclude this must be on a UK-wide basis,” she said.

What Ms Davidson says makes perfect sense. Everyone recognises that there are special circumstances that apply in Northern Ireland and that everything must be done to avoid a return to the borders of the past, but the deal that was on the table earlier this week was a failure of logic, diplomacy, and political common sense. Who knows if the DUP were properly consulted, but the fact that they were able to put the kibosh on the deal exposes the inherent weakness of Theresa May, a PM pulled in different directions but going nowhere.

The deal also failed to consider the Scottish dimension, which is worrying for those, such as Ms Davidson, who are concerned about protecting the union of the UK. It was obvious – or it should have been – that the SNP would cause mischief with the deal. But, had it gone ahead, a regulatory deal for Northern Ireland would also have created important economic differences with the other UK nations.

And did Mrs May really expect to get away with a deal that would effectively allow Northern Ireland to remain within the single market and customs union while keeping the rest of the UK out? We know that the DUP will never support such an arrangement (and when the DUP speaks, the PM must listen), which leaves only one alternative. If a hard Brexit for most of the UK and a soft Brexit for Northern Ireland is out of the running because of the DUP, and a hard Brexit for the whole of the UK including Northern Ireland is out because of the border issue, that leaves only a soft Brexit for all of the UK. And the problem with that is worryingly familiar: trying to leave the EU while also trying to keep most of its benefits.

Mrs May might yet be able to pull it off, but on the evidence of the last few days, the signs are not good.