The extraordinary rise of the Scottish Tories and the collapse in SNP seat numbers grabbed most of the headlines in the recent general election. Less remarked on was the sudden, unexpected exhalation of air that came from what was thought to be the corpse of Scottish Labour.

In 2015, Labour lost 40 of its 41 Scottish seats as the SNP rocketed from six to 56, was wiped out in its Glaswegian heartlands, and looked to have ceded its place as the choice of centre-left voters – perhaps permanently – to the Nationalists. But while the electorate’s convulsion in June against the SNP’s insistence on a second independence referendum most benefited Ruth Davidson, it also served to reanimate Labour.

The six seats grabbed back (making a total of seven) included three in the West of Scotland, proving that the Nat stranglehold on Labour’s territory was not quite as secure as it had seemed. There is, it appears, life in the old dog yet.

Not only that, but the surprise success of Jeremy Corbyn across the UK has stiffened Labour’s spine when it comes to insisting that it, and not the SNP, is the rightful home of Scotland’s socialists.

Corbyn was largely kept south of the border during the election campaign – Kezia Dugdale, the leader at Holyrood, had supported Owen Smith’s leadership challenge. But in August, Corbyn will embark on a five-day tour of marginal SNP constituencies that Labour could potentially take back at the next election. The party has set a target of reclaiming 18 Scottish seats as part of the 64 it needs across Britain to win a majority at Westminster. The trip will focus on traditional areas such as Glasgow and Lanarkshire, where tiny swings would return seats to the People’s Party. Dugdale is no doubt hoping for some reflected glory.

Corbyn will present himself as the authentically left-wing choice, a leader who will increase public spending and invest in public services compared to the austerity of the Tories and the timidity of the SNP. “Labour remains on an election footing as a government-in-waiting, ready to end failed austerity and ensure that Scotland has the resources it needs to provide the public services its people deserve,” he said. “Unlike the SNP and the Tories, Labour will transform our economy through investment, insisting that the true wealth creators - that means all of us – benefit from it.”

The SNP has benefited in recent years from the feeling among many north of the border that Labour and the Tories were committed to differing shades of a similar economic programme, that was starving public services of cash and that paid little attention to Scottish desires or needs. But as the Nats’ spell in government in Edinburgh has worn on, first under Alex Salmond and now Nicola Sturgeon, with little being done to tackle the nation’s social problems, patience has started to run out.

Dugdale said yesterday that she “looked forward to joining Jeremy in August as we take our message to the people of Scotland”. That’s not a sentiment we would have heard from her before June. But it does raise the future spectacle of Davidson’s Tories battling for the centre and centre-right vote and Labour gunning for the left. The SNP, which has tried to be all things to all people, will have to make a choice – boasting that it is “Scotland’s Party” is unlikely to be enough.

The 20th anniversary of the referendum that delivered the Scottish Parliament is almost upon us. Then, Scottish Labour provided the UK and the Westminster government with figures of the stature of Gordon Brown, Robin Cook, Donald Dewar and George Robertson. That was a long time ago, and the decline in quality of Labour’s representatives both in London and Edinburgh since has been marked. The SNP’s decade of success has attracted much of the brightest new talent through its doors. Young Scots still seem to be set on the idea of independence. Labour has a credibility problem that won’t be easily shaken off.

But still, the body has twitched – perhaps it’s even sitting up. Is Scottish Labour on the way back? If so, is that down to the SNP’s declining popularity or to Corbyn’s appeal? And could Dugdale be a convincing frontwoman for a genuinely left-wing agenda?

There may be trouble ahead. Yesterday, the Scottish Labour Campaign for Socialism – whose convener, Neil Findlay MSP, ran Corbyn’s leadership campaign in Scotland – accused Dugdale of “holding Corbyn back” in June. A spokesperson for the group said: “While it’s great we won some seats back, it’s clear that the campaign here failed to deliver. While elsewhere we've seen people being enthused by ‘for the many, not the few’ we concentrated on the dispiriting visionless ‘send Nicola a message’ – and paid a price for that, coming third in votes and seats for the first time in a century. In Scotland we looked more like [former Scottish leader] Jim Murphy’s Labour Party than Jeremy Corbyn’s – and that isn’t a good look.”

While the group insists this isn’t intended as a challenge to Dugdale, that might change if Corbyn receives a rapturous reception in August. We’ll learn then whether Scotland is falling for the high-tax, high-spending pitch that seems to be working so well elsewhere, and whether Scottish Labour has jerked back to life only to find itself staring down the barrel of a civil war.