On the first full day of the general election campaign John Swinney made an announcement he would not be supporting the sanction recommended by the cross party committee against his friend Michael Matheson.

SNP MSPs sitting behind the First Minister clapped and in the days that followed other senior figures - including deputy first minister Kate Forbes and deputy party leader Keith Brown - backed Mr Swinney.

His intervention came around a couple of hours after Holyrood's standards committee last Thursday morning proposed a record 27 day ban from parliament and 54 days loss of salary against Mr Matheson.

Their proposed punishment was in response to an earlier investigation by the Scottish Parliamentary Corporate Body (SPCB) - the cross party body which manages the parliament - that the former health secretary had broken parliamentary rules over an £11,000 iPad roaming bill.

Their probe ruled in March that Mr Matheson had twice breached the Scottish Parliament’s code of conduct and upheld three complaints that were made against him.

The Falkirk West MSP racked up the bill on a family Christmas holiday in Morocco in 2022 with the expense initially being met by the Scottish parliament, after he told officials that the device was used only for constituency and parliamentary work.

Read more on this story:

However,  as the media and political pressure for an explanation grew, Mr Matheson, who initially avoided telling the full story of the circumstance surrounding the bill and a claim for expenses to pay part of it, admitted in an emotional statement at Holyrood that the charge was down to his sons watching football. He also paid the money back.

Mr Swinney's rationale for not backing the proposed punishment was that the process behind it was prejudiced by remarks made last November by its Conservative member Annie Wells who said Michael Matheson’s “desperate efforts to justify his outrageous expenses claim have been riddled with lies, cover-ups and the need for us all to suspend our disbelief.”

Mr Swinney told the chamber: "If a constituent came to me and said that they were about to face a disciplinary panel at work,

and one of the panel members had made prejudicial comments about them, I would come down on that employer like a ton of bricks.

"That is the situation that Michael Matheson faces here, and that is why I will not support the sanction."

The alleged bias in the process remains the SNP position.

This analysis is part of our Unspun newsletter, delivering the best political writing in Scotland direct to you, every weekday evening. Sign up for free here.

James Mitchell, professor of public policy at Edinburgh University, yesterday questioned the wisdom of Ms Wells's choosing to speak out on Mr Matheson's actions while a member of a committee which may be have to deliberate on his possible punishment.

But despite Mr Swinney's criticisms of what he believes were the shortcomings in the process, he and his party, rowed back and by abstaining on the sanctions motion - hence sending Mr Matheson to his fate. Some 64 MSPs voted for the sanction while the 63 SNP MSPs abstained.

So what happened? Well, in short political reality intervened.

It swiftly became apparent that the narrative Mr Swinney wanted to to pursue - seeking proper and fair justice - couldn't win out in the public's mind against the rival perception that the SNP were simply trying to protect one of its own.

Opposition parties seized on Mr Swinney's support for Mr Matheson, while some SNP MPs were left stunned.

One Westminster source told the Times the group of MPs was “banging our heads off desks” as the party's election campaign launched with a defence of Mr Matheson.

A second source told the paper: “If Matheson had any decency he’d offer his resignation.”

The decision by the Greens to back the sanction recommended by the committee played a significant role in the SNP's change of mind.

Over the weekend there were press reports of a possible "backroom deal" between the former government partners perhaps to back a lesser sanction than the one proposed.

But in the end the Greens gave short shift to this course of action and voted for the sanctions.

And finally, amid the tensions of the election campaign, polling suggesting Labour are gaining more ground on the SNP, and a poll earlier this month suggesting many SNP voters (62% of voters who backed the party in 2019) think Mr Matheson should have resigned, it's likely that SNP backbenchers in Holyrood began to have their doubts too - and voiced their concerns at the weekly meeting in parliament.

Now the party just wants to move on from the "Michael Matheson iPad bill saga".

But with an election in just over five weeks it's unlikely that the Conservatives, Labour and the Lib Dems, will be just as keen to put the matter to bed.