It’s the morning after. Yesterday was a ball, at least for remainers. But it was like the Duchess of Richmond’s ball before Waterloo; now, the real battle must commence. The supreme court did not rewrite the UK’s constitution on Tuesday, it merely enforced the conventions of the existing one. It reasserted, “Be ye never so high, the law is above you” – though it cited no particular law, rather the “rule of law” as interpreted by itself.

The person who should be resigning is the Commons leader, Jacob Rees-Mogg, for inducing the monarch to collude in a political device. We can only imagine how pompously he would now be demanding resignation were the culprit not him.

If Johnson was shrewd, he would, in the name of unity, summon an elder statesman like Ken Clarke

As legality recedes, politics returns. Today parliament has been handed back its bruised sovereignty and must decide what to do with it. Enter the law of unintended consequences. Brexit on 31 October is still European law, pending its extension under parliament’s recent legislation against a no-deal Brexit act. The supreme court ruling has no effect on this. Indeed, the court’s unequivocal, almost gleeful judgment – clearly motivated by Johnson’s arrogant refusal to argue his case – has deepened the entrenched divide in British politics.

This may yet prove helpful to Johnson. The rightwing press, speaking for hardcore leavers everywhere, sees remainers under every bed. It paints the judges as stormtroopers for remain, “enemies of the people” and tools of the metropolitan elite. In its eyes, the prime minister is onside against the establishment. Good on him.

Johnson is still in reckless mode, wedded to Trumpian belligerence and brinkmanship. But to deplore this strategy does not render it implausible. Unless the Commons coheres behind an alternative leader or party grouping – of which it seems tribally incapable – Johnson remains prime minister. The Commons dares not even vote no confidence in him. If he lurches on into October without a deal, he or someone in the government’s name must ask Brussels to delay Brexit into the winter. When that is agreed, as it surely would be, an election would become unavoidable. Johnson would plead for a mandate again to “deliver Brexit, do or die”, blaming all and sundry for stopping him. With his enemies divided, he would probably win.

The one alternative is a deal along the lines already agreed by Theresa May, and rejected time and again by the foolish Commons. Events have moved on. If Johnson was shrewd, he would await the end of his conference next week and, in the name of unity, summon an elder statesman such as Ken Clarke. He would license such a figure to forge a cross-party agreement based on the May deal, sweetened by pleading with Brussels for a new form of words governing an Irish border. Here negotiators are still playacting. Such a deal is feasible.

Johnson faces political humiliation, but that will play well with some voters | Katy Balls Read more

The UK could then leave the EU on 31 October with a withdrawal agreement and enter a transition period, with all options (other than remain) on the table. It would honour the referendum. For Tory leavers it would be the least worst outcome. The political climate would instantly shift. Johnson, proclaiming himself “deliverer of the will of the people”, could romp home at a subsequent election.

I cannot imagine a worse prime minister to be leading the country just now. But that is not the issue, any more than whether Johnson broke the law. If he can keep his nerve, this could yet be his hour of pain before an electoral dawn. Forget the judges. Only the short term matters. The true maxim is: be you never so self-righteous, politics is above you.

• Simon Jenkins is a Guardian columnist