A FORTNIGHT ahead of the vote, polls put potential SNP wins at 43, making for a gain of eight seats.

Privately, senior party figures were talking about the need to “manage expectations” after earlier forecasts that suggested their victory would be even greater.

Questions were asked at that point about what the press should be told. “We’re not looking at a 2015 situation,” one told The National. “We think we’ll do 41 at best.”

If that in-house estimate had been correct, it would still have seen Sturgeon’s side achieve its second best ever Westminster result.

READ MORE: Nicola Sturgeon to publish new legal case for indyref2 next week

But in the end it was several short of the 47 total – 48, if suspended SNP candidate Neale Hanvey is included after winning Kirkcaldy and Cowdenbeath from Depute Scottish Labour leader Lesley Laird.

On Thursday night Humza Yousaf said the party had not been confident of success, because it is “not complacent”.

The National: Justice Secretary Humza Yousaf

As Justice Secretary, Yousaf holds one of the highest positions in the Scottish Government, and as a key member of Nicola Sturgeon’s cabinet, he is also in the SNP’s top tier.

Speaking at the count in Glasgow, Yousaf said Sturgeon has ensured the SNP has “never been complacent” under her leadership, summing up the approach as thus: “You work as if you’re one vote behind, even if you’re 10,000 votes ahead.”

The hard work, he said, was underpinned by strong messaging – and lessons learned from the last contest in 2017, when 21 SNP MPs lost their seats.

“In 2017 we made the losses, the message wasn’t as clear as it is now,” he said. “From the doors I’ve knocked people understand what we were standing for – lock Boris Johnson out of Number 10, stop Brexit and get an independence referendum.

“We put independence at the heart and centre of the campaign.”

But on the Boris Johnson pledge, Yousaf acknowledged that hasn’t been delivered. “We’ve done our best, we kicked as many Tories out of Scotland as we could out,” he said. “What’s not happened is Labour haven’t delivered in England. If Labour had won every seat in Scotland it wouldn’t have made a difference.

“On the two biggest political questions in my lifetime, independence and Brexit, their position has been so poor, unclear and ambiguous and so far removed from what their core voters want.”

READ MORE: Bernard Ponsonby destroys Scottish Tory's argument against indyref2

Anas Sarwar of Labour agreed. “On both of the issues we choose to sit on the fence,” he said. “I’m feeling angry that for all those communities that needed a credible Labour Party, we haven’t given them one.

The National: Anas Sarwar

“Boris Johnson is an absolute abomination of a Prime Minister. We needed a credible Labour Party. We failed on that objective.

“I’m devastated. My only thought is for our candidates who I know knocked their pans in for six weeks. They’ve been let down.

“We have a human responsibility on how we support these wonderful candidates. We’re seeing good people decide to walk away.”

That erosion of core campaigner networks is in stark contrast to the armies of activists who helped drive the message home for the SNP.

David Linden, winning again in Glasgow East, thanked the 160 people who’d aided him there.

That base is drawn from a mammoth membership that dwarves every other party in Scotland, and most in the UK.

While many have signed up since 2014, the precision campaigning the SNP is now capable of relies heavily on the knowledge and experience of veterans who have been in the ranks for decades.

“We were chapping doors and getting results in areas where we’d never get anything in the past,” one senior campaigner in Glasgow said.

“We’d go to some places to get laughed at and abused. That doesn’t happen now.”

As the SNP celebrations drew to a close Pete Wishart – who just clung onto his Perth and North Perthshire seat by 21 votes in 2017, took in the size of his new majority of 7550.

The National: SNP MP Pete Wishart

“I had no conception that my majority would be so high,” he said. “It’s such a stunning result. Throughout the campaign I did get a feeling it was just ours to lose and I didn’t get any sense we would lose the seat, but I never thought we would get such a large majority. That was a very pleasant surprise.”

Wishart put the success down to a clear message by the SNP of stopping Brexit and Scotland’s right to choose its own future but also that the SNP were able to gain from what he believes were the Tories’ weaknesses.

“There was a real antipathy surrounding Boris Johnson – that was something that kept coming up on the door steps,” he explained.

“But also the Conservatives stuck to a tired and failing message to reject a second independence referendum. The message didn’t resonate this time around. It was failing and didn’t chime with voters in my constituency.”

The challenges of campaigning in the depths of the winter darkness and cold weather were faced by activists in all parties, said Wishart, who added that his team took account of the limited daylight to concentrate on chapping on doors between around 4pm and 7pm rather than make later visits to voters who might not want to be disturbed when night fell.

He also said that they also tried to bring a note of festive cheer to the campaign released a music video taking apart the Conservative Party’s efforts in the election campaign in the style of the Twelve Days of Christmas. “The Twelve Days of Brexmas” poked fun at Johnson’s Brexit deal and targeted unpopular Tory politicians like Jacob Rees-Mogg.

In Inverclyde where Ronnie Cowan was returned with a majority of more than 7500 for the SNP, he agreed a clear SNP message was key to his success.

The National: Ronnie Cowan MP says SDCRs are 'the gift that keeps on giving'

“We had a three-pronged attack. We were anti-Brexit, anti-austerity and pro-independence and we just kept hammering that message on the doors and people responded well,” he said.

READ MORE: Nicola Sturgeon to publish new legal case for indyref2 next week

Like activists across the country Cowan and his team forced themselves to go round the doors in less than ideal weather.

He said: “We did get a few soakings, but we just got the bit between our teeth and cracked on with it. What would be the alternative? If you were to sit in your office and not do anything you would fear the opposition is out there and that would get us out.”

One party veteran said some of incumbent SNP MPs had learned the lessons of 2017: “A number of our guys were not quite as humble as they needed to be, and people voted accordingly.”

The memory of 2017 and the lose of 21 seats certainly focused minds.

“It was a pretty brutal campaign” said one party staffer speaking anonymously. “There were times when I thought we would win 59 seats and times when I worried that we might dip below 20. I should have kept the faith.”

Today the SNP’s new, larger, Westminster parliamentary group will gather in the City of Discovery where MPs will scope out what the new frontbench team will look like, and who’s doing what job. One role that will need filled sooner rather than later is the party’s new Foreign Affairs spokesperson. The last holder of that role, Stephen Gethins, was the only SNP casualty of the election. He had held on to his North East Fife seat in 2017 with a majority of just two., but on Thursday the LibDems took the constituency.

The loss of Gethins will be keenly felt in the party. Hannah Bardell MP said: “It’s huge. I’m not even going to try and dress that up. It’s just ... I mean I’ve known, Stephen since 2007 when I worked with

him on the Scottish election campaign. He’s been a pal, he’s been a mentor, somebody I worked really closely.”

The groups will also discuss how they can “dovetail” with the Scottish Government’s push for a section 30 order, or, as one MP hinted yesterday, how the party might be able to amend the Scotland Act to allow Indyref2.

And of course one discussion the party needs to have is what it will do about Neale Hanvey, the Kirkcaldy and Cowdenbeath candidate who was suspended from the SNP in the middle of the campaign for using antisemitic language on social media.

On Thursday he was elected with a majority of 1243 – defeating Labour’s Lesley Laird, the shadow Scottish secretary. Because his suspension came after registration, Hanvey was still down as the

SNP’s candidate, but when he takes place on the green benches on Tuesday he will be sitting as an independent. One MP said they thought Hanvey would be brought back into the party.