The SNP leadership race has been revealing not only for the state of the SNP, but for the health of Scotland’s other main political parties, too. Not one of them comes out of it well.

For the SNP, the contest has been a disaster. Whether, as a party, it is able to recover from it quickly will depend on whether its members have done a Tory (and elected the ideologically pure candidate, Humza Yousaf, who is the SNP’s Liz Truss) or whether they will prove themselves more astute than Conservative Party members were last year, by electing the only sensible, pragmatic candidate (Kate Forbes), who can steer her party in the new direction it so manifestly needs.

Whatever the outcome, blame for this fiasco of a contest lies squarely at only one person’s door - Nicola Sturgeon’s. We knew that her record in government was dismal. We knew that she left her party with no credible path to Scottish independence, no obvious successor as leader, no significant policy achievements, and nothing to show for her long string of election wins save the dreary, low-level corruption that always comes when one party stays in office too long.

Read more: Why Scotland’s next constitutional row could be about Israel

But now we also know that the brittle structure which propped her up in power for so long was as hollow as it was devoid of moral fibre. It’s not just her deputy who has fallen with her: it’s her chief of staff, her spin doctor in chief, and her disgraced husband: the party chief executive who failed to understand the elementary difference between spin and an outright lie, and who resigned not because he knew he had done wrong, but only because he was caught red-handed. Even the candidates in this race no longer trust the process of election over which he, as chief executive, presided. All fish rot from the head down: even sturgeon.

I have no idea who will be next. But if it’s Humza Yousaf, you have to feel sorry for him. The erstwhile continuity candidate will find a party with precisely zero continuity, the entire senior management having departed the stage (along with tens of thousands of party members), and a country that yearns for something different, something fresh, something new, something that does not suffer from that lingering smell of fish rot.

Scotland’s appetite for more of the same has been well and truly extinguished by this embarrassment of a leadership race.

Mr Yousaf is the Malvolio of this contest. In a vain, doomed effort to please his political mistress, he prances about ever more outlandishly in his yellow stockings and black garters, drawing attention to himself. Ms Forbes may be the presbyterian, but Mr Yousaf, just like the Malvolio of Shakespeare’s Twelfth Night, is the insufferable puritan.

Read more: As a unionist, Kate Forbes is the SNP leader we most fear

This is the man of the Hate Crime Bill. This is the man who will crusade for his political mistress’ fixation with the right to gender self-ID - all the way to certain defeat in the UK Supreme Court, if needs be. This is the man who will make misogyny a crime and who will outlaw conversion therapy. This is the puritanical, cheap, gesture politics Scotland has to look forward to if Humza Yousaf is indeed our next First Minister. It will do nothing to improve public services in Scotland, and it will do nothing to alleviate poverty. But that’s continuity for you.

If this is our fate, it won’t last. So far removed are these ideological priorities from mainstream Scottish public opinion that Mr Yousaf will crash and burn. Probably outlasting Liz Truss’s 44 days in office, but possibly not by much. The really bad news for the Scottish National Party - so gifted, as it is, at running competent leadership elections - is that it will likely have to do it all again before long.

If Kate Forbes wins, her problem will not be the same as First Minister Yousaf’s would be. He will find it easy to form an administration and impossible to achieve anything in government, so inept will be his personnel of choice. Ms Forbes faces the opposite problem. A Forbes administration will be hard to assemble, given how vociferously and viciously so many of her senior party colleagues (to say nothing of the Greens) have sought to distance themselves from her. But, if she does pull it off, it is clear that hers would at least be a government with a mission - a government which might, at last, start to achieve something for the country. One can but hope.

And what of the opposition? How have they fared during this most unedifying of spectacles? They have enjoyed their gloating, that is for sure. And well they might, for the collapse of the SNP’s house of cards has been a long time coming. But they should pause their glee before they guffaw on their popcorn lest they choke.

Get The Herald for three months for £1 with our new subscription offer

It is true that governments lose elections more than oppositions win them. But it is also true that governments lose elections to oppositions which look and sound and feel like alternative governments in waiting. Sir Keir Starmer rose to this challenge last year when the Tories were making Shakespearean fools of themselves, but Anas Sarwar and his team still have a great deal of work to do before we even notice who they are, never mind what they want to achieve. Urgently, they need to step into the spotlight and stop hiding in the wings.

And as for my old crowd, the Scottish Conservatives, they call to mind now only a minor character from Twelfth Night. Sir Toby Belch may make indelicate noises from the sidelines, and may even raise a laugh from time to time, but he is not central to the action and, in the final act, he appears wounded from a fight he himself started. He seems an apt fit for the Scottish Tories - typecast, you might even say.

Adam Tomkins is the John Millar Professor of Public Law at the University of Glasgow School of Law. He was a Conservative MSP for the Glasgow region from 2016 to 2021.

Our columns are a platform for writers to express their opinions. They do not necessarily represent the views of The Herald.