The SNP’s propensity for giving themselves a doing in recent years has been a thing to behold.

According to Professor Sir John Curtice, last year’s ugly and bitter leadership contest cost them about 5% in the polls. 

The prospect of another messy battle in the run-up to what will be a ridiculously difficult general election left many of the MPs who’ll be fighting to hold their seats utterly despondent. 

The pressure has been on to avoid that at all costs. 

By Wednesday night, conversations with senior sources in the party and the government suggested that this had been achieved.  

READ MORE: John Swinney set to be next SNP leader and First Minister

Neither John Swinney nor Kate Forbes were giving anything away in parliament, but they confirmed that they had spoken on Tuesday.

Others had also acted as emissaries, including MPs Stewart McDonald and Ian Blackford. 

Mr Blackford, who knows both Ms Forbes and Mr Swinney well, denied that their involvement had been pivotal. 

“I don’t want to overplay the role that either of us played, but I've been around a long time and the only thing I care about is the best interests of the party,” he told The Herald.

“If there was anything I could have done that might have been helpful in some regards, then that’s fine, but I wouldn’t overstate it.”

He was, he admits, anxious about the prospect of a leadership contest. 

The conversation between Ms Forbes and Mr Swinney was "frank".

In her statement, she said what had emerged "was that we share a powerful common purpose for the country."

Some of that shared purpose could be seen in some of the similar thoughts that were expressed in Mr Swinney’s speech and Ms Forbes’s statement.

Strikingly, both appeared to gently push back against Humza Yousaf and the Bute House Agreement. 

"The climate emergency is a real and present threat to our society. But we must design an approach to net zero that takes people and business with us,” Mr Swinney told the audience of supporters and journalists in the Grassmarket. 

The transition to net zero “must work with, and not against, our communities and businesses,” said Ms Forbes. 

There were echoes too when it came to economic growth and party reform.

READ MORE: Kate Forbes to make announcement' on SNP leadership race

The race to replace Humza Yousaf kicked off last week when it became clear that the Greens were livid at the ending of their time in government and that the FM could not rely on them to support him in a confidence motion. 

On Tuesday morning, just 24 hours after he formally announced his resignation, there was a camera crew outside the Forbes’ house in Dingwall waiting to doorstep her.

Her husband, Ali, left the house driving his van right in front of the camera, allowing his wife the luxury of a three and half hour drive along the A9 before she had to answer questions on her leadership ambitions.

By 12.30, the Scottish Parliament’s Garden Lobby was rammed with reporters and camera crews all waiting for her to leave the MSP’s block.

When she eventually did appear just over an hour later, she was upbeat, saying nothing, though, as always, saying it very politely.

Ms Forbes was supposed to be at the External Constitution, Europe, External Affairs and Culture Committee on Thursday but unexpectedly pulled out. 

According to the Times, her 21-month-old daughter, Naomi, had an accident on Wednesday which led to the pair of them spending a few hours in Edinburgh’s Sick Kids.

She is well, but Ms Forbes, understandably, wanted to spend time with her family rather than answering questions from journalists. 

Those SNP MPs and MSPs who started the week desolate are now cock-a-hoop. 

"This is the best outcome we could have got," said one.

Another source said any unhappiness from members that they didn’t get a vote or a chance to ask questions at a hustings, would surely be short-lived as two of the party’s best and smartest performers team up. 

It should, all going well, steady an unsteady government and bring peace to a fractious and spooked Holyrood group ahead of what will be the hardest election in the SNP’s history, the bid for a fifth term  - a quarter century of government. 

But how long will that peace last? Even though Swinney insisted he’s staying until 2031 at least, that’s only six years away.

It’s thought that part of the reason that Ms Forbes did not throw her hat into the ring was that it might have been impossible, had she lost a second time, to stand again for a third. 

The next SNP leadership contest will not be that far away.