It is a measure of Mr Swinney’s inherent decency that he told no-one in the party before going out to see his deputy leader and telling her, face to face, that he was going to resign.
In doing so, he set in motion a process that will result in yet another summer of blood- letting within the Nationalist movement as the SNP turns inward once again, rather than taking on and challenging its political opponents.
The private talk with Ms Cunningham marked the culmination of a truly dreadful week in Mr Swinney’s career, the end of his boyhood dream of becoming leader of an independent Scotland.
The trigger was the result of the European election, announced from the top of Mercat Cross in Edinburgh nine days ago. The SNP came second to Labour and avoided slipping to third only because the UK Independence Party took votes from the Tories.
The Nationalists held on to their two European seats but the party’s support had dropped substantially from the last European election in 1999.
The SNP vote was down seven points, taking its share of the vote below 20 per cent, and this alarmed activists and MSPs in all corners and political hues of the party.
Soon, senior figures started briefing anonymously against Mr Swinney. No-one was willing to come out publicly against Mr Swinney at that stage but it was clear that the ground was moving under Mr Swinney’s feet.
One or two determined figures used the media by giving briefings to keep up the pressure on Mr Swinney until a couple of critics broke cover.
First there was Gil Paterson, a former MSP, who called on Mr Swinney to go, then there was Mike Russell, another former MSP, who was not as categoric but suggested a change of approach was needed from the SNP.
What was happening behind the scenes was crucial. Members of the Nationalists’ shadow cabinet began talking privately about stalking-horse candidates, bloodless coups and leadership elections with a seriousness that had not been in evidence before.
Two surveys were published, one showing increasing discontent among SNP MSPs and the other disillusionment with Mr Swinney’s leadership in the constituency branches.
According to party insiders, it is understood that even Alex Salmond, the former party leader and a Swinney ally, told him late last week that his leadership was over and that he had to make a dignified exit in exchange for senior party figures not calling openly for him to resign.
One SNP activist said: "Alex told him the game was up. But John is a decent guy and he could either go with dignity or lose his job in a leadership contest."
Mr Swinney insisted yesterday there had not been one, single factor that convinced him it was time to go - but something triggered his decision on Monday.
Friends say it could have been something as simple as a word of sympathy from his wife, Elizabeth, a BBC Scotland journalist. Others say the realisation on Monday afternoon that virtually nobody in his senior team was prepared to make a strong on the record endorsement of him was the end.
But by Monday evening, Mr Swinney had decided to go and took the drive out to Crieff to tell Ms Cunningham.
He will remain in his post until a successor is chosen and, in an ironic twist, is bound to be cheered to the rafters by his MSPs when he stands up at First Minister’s Questions tomorrow.
When he announced his decision to the media, Mr Swinney made a point of lambasting the snipers and back-biters within the party who have questioned his leadership so incessantly over the past four years.
Such constant in-fighting has made his job extremely difficult and the real question for the SNP, and particularly the next leader, is: can this be stamped out now or will it plague the party for years to come?
The SNP’s central problem is that it is a disparate alliance under the umbrella of Scottish independence.
Members come from left and right, from environmental pressure groups and industrial backgrounds, and range from independence-at-all-costs fundamentalists to cautious gradualists. It is perfect for a movement but unworkable for a functioning political party which hopes to win power.
In short, the SNP has found it difficult to make the transition from a single-issue movement to multi-policy political party and until it sorts out what it is doing and what it wants to be, it will continue to be a focus for squabbles and fights.
Some MSPs were expressing the hope yesterday that this summer’s leadership contest will allow the party to go through a cathartic process of self-discovery, so that the party can emerge at the end of it sure of where it is going.
But that will take strong leadership and whoever wins in September has to be able to say to all party members: "This is the way the party is going and you either pull together or leave."
The front-runner is Ms Cunningham, who was first to declare her candidacy yesterday evening.
As someone who was intricately involved in Mr Swinney’s leadership, she will have to carry some responsibility for the failures of the past but will argue that she provides the best continuity in terms of policy from the last few years.
She is from the left of the party and would hope to unify the various strands within the SNP. Her problem is that she has enemies who question her commitment to the hard slog of leadership.
If Nicola Sturgeon, the SNP’s justice spokeswoman, was to stand, it might split Ms Cunningham’s support and allow someone else in.
That is why some senior figures were suggesting a so-called "dream ticket" of Ms Cunningham and Ms Sturgeon for leader and deputy leader but, at least last night, Ms Sturgeon was not willing to discuss that. Ms Sturgeon has decided to talk to friends and colleagues and assess her options before deciding what to do.
It is likely that the fundamentalists will be led by Alex Neil, who has stood for the leadership before, in 2000, and may well do so again.
He will appeal to the radical edge of the SNP, standing on a platform of independence with no compromises or concessions to the unionists.
Mr Neil’s colleagues were making it clear last night that he wanted to see a contest because he wanted to give the party a chance to discuss its future direction and even if he believes he does not have the support to win it, he may well stand in an attempt to introduce a more fundamentalist approach to SNP policy.
Mr Neil’s problem is a lack of members. Under the new leadership election rules, only those who were fully paid-up members of the SNP by midnight last night can vote.
Some of Mr Neil’s colleagues are understood to have been persuading fundamentalist members not to sign up this year in an attempt to embarrass Mr Swinney.
But this has now backfired because it means that quite a number of fundamentalists, who would almost certainly have supported Mr Neil, are ineligible to vote.
This will certainly harm his chances, as will an impression among some party members that some of Mr Neil’s allies, such as the rebel MSP, Campbell Martin, have damaged the SNP by constantly questioning Mr Swinney’s leadership.
Fergus Ewing may decide to stand and although he is to the right of the party on some issues he has two major advantages. He has a power base in the Highlands and he is a Ewing - which still carries weight within the party.
Mr Ewing’s Highland support is important because this is a one-member one-vote election, and the bulk of the voters are in the North-east, Tayside and the Highlands.
Nicola Sturgeon may stand but, if she does, she will have to find some way of tapping into support in the North-east and Tayside. If she does not, her small but loyal band of supporters in Glasgow will not be enough to carry her through.
Mr Swinney has left one legacy for his successor. He has reformed the party rules to give members more power and cut out the vagaries of rule by the hardened activists who attend party conference.
But he also changed the rules for election of a party leader, handing over power to the members for the first time. These new rules will be tested for the first time this year.
Under the rules, nominations for the leadership opened yesterday as soon as Mr Swinney announced his decision. The closing date for nominations is on 16 July.
If only one candidate comes forward by the time nominations close, they will assume the leadership. However, if the leadership is contested, it will go to a ballot.
Ballot papers will be mailed to all members by 13 August and must be returned no later than 31 August.
Ballot papers will then be counted by an independent organisation and the result will be announced on Friday, 3 September, three weeks before the party’s autumn conference.
Jack McConnell can use the summer to work on his golf handicap, safe in the knowledge that a year which was going very badly for him has now turned around, with all the attention focused on his opponents.
The irony for the Nationalists is that, just when they appeared to be making progress in denting Mr McConnell’s credibility, they face a crisis.
The tragedy for Scottish politics is that there is a government which needs to be held to account and there is no opposition strong enough or united enough to do it properly.