IT was a cry of desperation. When David Mundell pitched up at Holyrood on Thursday, he was asked about the stalemate between Edinburgh and London over the EU Withdrawal Bill.

The night before, the House of Lords had amended Clause 11 of the Bill in line with a deal accepted by the Welsh Government, but rejected by the Scottish one. With UK insiders calling it their ‘final offer’, and Nicola Sturgeon refusing to recommend it to Holyrood, it means the slow-motion constitutional crisis of recent months is set to continue.

Mr Mundell was asked how to break the year-long impasse between Edinburgh and London. “We will need some third way.” Ah, a fabled third way. But what? “I’m not clear what that is,” he added.

Relentlessly Micawberish about the prospect of a deal until now, he also admitted it may never turn up. “Clearly, we may not reach agreement. That’s self-evident.”

With no agreement meaning a dogfight at the UK Supreme Court, Holyrood withholding consent for the EU Bill, and Westminster likely to impose it on Scotland regardless, we are now just a few weeks from veering off the constitutional map.

The dispute is ostensibly about consent. The UK government wants to hold onto 24 devolved areas returning from Brussels after Brexit to create UK-wide frameworks to harmonise regulations, mostly in agriculture and the environment, across the UK internal market.

SNP ministers insist frameworks must be agreed by consent. The UK government says that would give Holyrood the power to veto frameworks meant to cover England, Wales and Northern Ireland.

That would be an unprecedented departure from the devolution settlement, London says, pointing out the 1998 Scotland Act behind devolution clearly says Holyrood’s writ doesn’t run outside Scotland.

After a rewrite of the obnoxious original, the amended Clause 11 of the EU Bill offers a compromise - a set of hoops the UK must jump through before it gets the powers it needs to make frameworks.

This says repatriated powers in devolved areas will go to Holyrood automatically unless Westminster specifically reserves some for a few years through regulations.

To get a regulation, the UK government must first seek Holyrood’s consent. If this isn’t forthcoming after 40 days, the UK will “not normally” push on, but can if it wants to, provided it explains its case in the Commons and Lords, and Holyrood has its say too.

It is then for the UK parliament, not the UK government, to decide if the regulation is passed or not.

It is not true, as Ms Sturgeon has implied, that London deliberately and wickedly misinterprets a lack of consent to be the same as consent.

Regulations can still be passed by Westminster against Holyrood’s wishes, but only after an elaborate process involving MPs and peers.

It is this mechanism which the Welsh government signed up to, and which SNP ministers have rejected.

Both sides see this as a matter of principle. Ms Sturgeon has said “no self-respecting” MSP could give the mechanism “the time of day”.

While, Lord Keen, the Advocate General, made it clear a Holyrood veto over the sovereign parliament was equally unacceptable: “No Government who govern in the interests of the whole of the country could agree to such terms.”

But one of the most interesting aspects of Wednesday’s Lords debate was an appeal to stop treating the 1998 Scotland Act as a quasi-religious text, and instead recognise it as a pre-Brexit artefact.

As many peers noted, it dates from a time when leaving Europe was inconceivable, and there was no thought given to devolved powers held in Brussels ever coming home.

The devolved powers going to Edinburgh next year will do so largely because they were left off Schedule 5 of the Act, which lists powers reserved to Westminster.

That’s why they’re now regarded as devolved by default; but they’re hardly devolved by design.

If the UK had never been in the EU and was about to legislate for a new devolved Scottish Parliament, those powers would undoubtedly be carved up very differently.

As Lord Hope, the former Lord President and Ms Sturgeon’s ally in the Lords, said, pragmatism is needed in the unique circumstances of Brexit, rather than principle.

“The purist argument - that of principle - does not really apply here. This is not about trying to construct the market that we were trying to construct in 1998, which was done by separating out the bits that mattered for that market into Schedule 5 so that they were clearly identified.

“We are dealing with a different, rather more subtle situation in trying... to create a functioning internal market with what has come back to us from Europe.

“That requires a rather more subtle approach that is not really dealt with in the Scotland Act for understandable reasons.”

So why is Ms Sturgeon digging in over a 20-year-old Act that’s being overtaken by events? Misplaced principle or lots of politics?

She could strike a deal, of course. SNP conference next month would be a good moment to hail a major concession from Westminster, even if the fine detail was footling.

But the SNP never takes its eye off independence. Right now, the public seems indifferent to the EU Bill tussle. But the Supreme Court case could be sold as a David and Goliath battle between plucky Holyrood and brutish Westminster.

Then there is the prospect of Brexit law being imposed on Scotland against Holyrood’s will. Punters would surely notice that.

No deal leads to a noisier, angrier, more tribal debate, and therein lies Ms Sturgeon’s opportunity.

The Lords may be right about the subtleties, but raw politics wins out.