Thrashed by the Conservatives in rural Scotland while Labour ate into their central belt support base, the General Election was a sobering experience for the SNP.
After the heady heights of winning all but three of Scotland’s Westminster seats in 2015, Nicola Sturgeon put all her chips on pro-Remain Scots getting behind a second independence referendum in order to escape Brexit.
But the First Minister’s gamble backfired and the party lost a third of its seats, including those of talismanic figures Alex Salmond, Angus Robertson and Tasmina Ahmed-Sheikh.
So, as the SNP membership meets for its annual conference in Glasgow, what next for the party?
The Nats face an attack on two fronts. On one, an increasingly left-wing Labour Party under fresh leadership who will be perfectly positioned to absorb Yes-inclined voters with radical pledges such as the re-nationalisation of rail - which the SNP faithful back in greater numbers than Labour voters.
Secondly, a revived Scottish Conservative Party, under the talented and influential Ruth Davidson, has a foothold in the rural north-east and borders and are making hay from the Scottish Government’s faltering education reforms week-in week-out.
As Brexit looms large, the road ahead is far from clear now the voters have delivered their verdict on Sturgeon’s hasty post-Brexit claim that ‘Indy Ref 2’ was then “highly likely”.
Ruth Davidson’s ruthlessly efficient attack line – “get on with the day job” – could prove lethal if the SNP is unable to shake criticism the party is obsessed with the constitution.
But with the vote split across three main parties in Scotland, it is all to play for. The troops now have to figure out a formula that will shore up potential losses while remaining in government at Holyrood.
It would be premature for anyone, least of all Davidson, to declare we have reached ‘peak SNP’.
A YouGov poll for the Times sees Sturgeon’s party way out ahead on 35 percent, impressive for a party which has been in power for a decade, while Labour enjoys a 5 percent boost in support and the Tories are pushed from second to third place at Holyrood.
Ministers would point to support for their new programme for government, unveiled in September, which, after months of divisive campaigning, saw the First Minister take a more consensual approach.
Policies on business tax reform, extending free personal care to the under-65s, a ban on fracking, consulting with local government on education reform and a new National Investment Bank will quell some of the criticism levelled at her from left and right.
Perhaps seeing the writing on the wall after the Corbyn surge south of the border, Sturgeon also performed something of a U-turn and pledged to lift the public sector pay cap, too.
What she hasn’t spelled out is how she will pay for it, with her Finance Secretary Derek Mackay expected to trigger emergency borrowing measures - something Conservative backers who lend the SNP their vote may take a dim view of in the long term.
But despite furiously attempting to square all these circles, Mackay insists the party is up for the fight.
“I think the party is still positive and upbeat and we have a strong and united membership,” says Mackay, who will chair this year’s conference. “We are the ones who have returned from the summer recess with our tails up.
“It is the opposition that look tired and weary.”
With more than 118,000 members, the SNP is thought to be the second largest party in the UK, with Scottish Labour having just a fraction of that figure (21,500 to UK Labour’s 570,000) and the Tories as a UK group reported to have fewer than 100,000, though no official figures have emerged since 2013.
But as the SNP has recorded a drop from 120,000 in 2014 when the party put on around 100,000 members post-independence campaign, chiefs are searching for growth opportunities in order to survive into the future.
Mackay went on: “The Tory surge is well and truly over, their bubble has burst. They have fallen back into third place in Scotland in opinion polls and in membership.”
While Mackay would insist the SNP’s ten years in power have been “transformational”, scores would disagree.
Tax measures remain almost identical to those administered in England, despite promises of bold reform, economic growth sees the nation lagging behind other parts of the UK and despite Sturgeon staking her premiership on delivering better education outcomes, Scotland’s PISA (Programme for International Student Assessment) ratings slump to below England, Estonia, Finland and Slovenia.
Labour frequently accuses Sturgeon of failing to fully use all of the welfare powers devolved to Edinburgh - though she will attempt to mitigate the impact of Universal Credit - and SNP voters who jumped ship to Corbyn’s Labour in June would say the party has failed to deliver on their promise of leading a progressive government.
Motions at the conference next week, put forward by various branches, seek to bolster the party’s leftist credentials.
While the party is already investigating a universal basic income, motions at the conference also call for the devolution of immigration controls, a resolution on treating drug misuse as public health rather than criminal matters and there will be a groundswell of support for Glasgow South MP Stewart McDonald’s bid to outlaw unpaid trial shifts with a private members bill in Westminster.
Maintaining their left of centre stance is good politics, considering Scottish Labour looks set to elect Corbyn-support Richard Leonard as its next leader.
A Survation poll of SNP voters found they were more likely to vote Labour if it pledged more left-wing measures such as decommissioning Trident (30 percent), a mandatory living wage (37 percent) and renationalising the railways (27 percent).
Mackay said: “We have tried to show we are still radical and that we can deliver reforms. Our programme for government also shows that we are listening and engaging while also acting in the interests of the economy.”
The YouGov poll showed three quarters of Scots (72 percent) were pessimistic about the current state of the Brexit negotiations, while the number of Scots who believe that the Leave vote was the wrong decision has grown since April.
Excluding don’t knows, 66 percent of Scots thought Brexit was the wrong decision.
The same poll, however, showed virtually no shift in support for independence since Scotland voted No in 2014 by 55 percent and a surge in support for the pro-Union Scottish Labour Party.
Sturgeon’s strategy was to link a “hard Tory Brexit” so closely with a re-run of the independence poll, the issue must now be handled with extreme care if the party is to stem the flow of votes to their rivals.
Talk of ‘Indy Ref 2’ has been firmly put on the back burner, with senior figures even urging for the second poll to be kicked further down the road, from pre-Brexit to post-Brexit transition period.
Though this is not a shift in party policy - Alex Salmond positioned the party as pro-European in the 90s - voters were riled by Sturgeon’s “opportunistic” use of the Brexit vote to further the independence cause.
The failed approach has also led to calls for chief executive Peter Murrell, Sturgeon’s husband, to stand down.
Despite losing his Moray seat, Robertson will stay on as deputy leader, while former investment Skye and Lochaber MP Ian Blackford takes on the job of Westminster leader.
Should support for Sturgeon continue to wane among the public, party insiders say “leader in waiting” Robertson may soon find a way into Holyrood - either via a by-election or in 2021.
Robertson in the meantime will turn his talents to building the next case for independence, which must be watertight on its economics.
One of the resolutions is for a Bank of Scotland, suggesting the independence movement could back a breakaway national bank with its own ‘Scottish pound’.
Young firebrand Mhairi Black has previously said she would be prepared to play a leading role in the next independence campaign.
But, with the wider economic picture and the Brexit negotiations with Europe still so unclear, noone in the party is yet willing to champion a ‘Brexit or Independence’ manifesto.
Mackay said: “After the Westminster elections, the First Minister herself said that we would revisit the issue [of a second independence referendum] in light of Brexit.”
However, he added that scepticism for Brexit was growing UK-wide, hinting the SNP’s strategy would not change substantially.
“I think the mood is changing,” he said. “Recent polling is suggesting that across the rest of the UK there is a shift as they are seeing what a hard Brexit means for the economy.”