How has the election campaign played out in Scotland?

After six weeks of debates, arguments, polls and scandals, the general election campaign is drawing to a close.

So how has the contest played out in Scotland, and where do the parties stand on the eve of polling?

It has been a funny sort of campaign, when you look back at the stories which have dominated.

All of the big offerings from parties had been announced well in advance of manifestos being launched.

No rabbits were produced from hats, and there has been little discussion of actual policy.

So the whole thing has run on more fundamental feelings about the parties themselves and the state of politics, with scandals and shifts in the opinion polls dominating coverage for days at a time.

Some of the narratives did blow over within days. Remember when talk of Diane Abbott’s candidacy was meant to have derailed Labour?

But others have stubbornly refused to shift - like the row over gambling, or the idea of a Labour "supermajority" now embraced even by the Conservative prime minister.

The campaign in Scotland feels a little different to the UK-wide one, given the dominant presence of the SNP disrupting the idea of a straight fight between Labour and the Conservatives.

It all happened very suddenly for John Swinney, who was parachuted into the leadership of his party and country at the very last minute.

He is perhaps the most experienced campaigner the SNP has got, but he hardly had time to get his feet under the table - and that tied his hands to a certain extent.

The first minister is not allowed to use the machinery of government at Holyrood to further the SNP’s campaign, so he hasn’t been able to set out things like an official energy policy or position on oil and gas.

He has acknowledged that the SNP has not had its struggles to seek in recent months.

Think of how the early days of the campaign were dominated by talk of Michael Matheson’s suspension from Holyrood, and the shadow which continues to be cast by the police investigation of the SNP’s finances and fundraising.

But Mr Swinney has had some success in reunifying the SNP.

A visible example was his deputy Kate Forbes out campaigning in Glasgow alongside his predecessor, Humza Yousaf.

It's a far cry from the fierce rivalry they had during the leadership contest of 2023.

There has also been a pivot during the SNP campaign, having started out using Mr Yousaf’s line talking up the election as a two-horse race between themselves and the Tories.

That was a position which had worked well for both parties over the last couple of elections, dominated by the issue of independence and the parties most clearly representing Yes and No.

But Labour is a third wheel no longer. In all of the TV debates, Mr Swinney’s key target was Anas Sarwar.

Mr Sarwar hopes to corral a decent number of Scottish seats in order to propel Sir Keir Starmer into Downing Street.

His party thinks the message of change - and of putting Scottish MPs at the heart of government - is more convincing than the SNP’s pitch, of providing a strong opposition to hold Sir Keir’s feet to the fire.

"Change" is a straightforward message that the party has been hammering away at for literally years at this point, and it feels like one which chimes with much the public sentiment of being generally scunnered with politics.

Labour strategists have always been coy about their prospects though, refusing to specify just how many seats they think they can target north of the border.

But consider the places that Labour figures have been visiting.

Sir Keir has popped up in Inverclyde and Renfrewshire West (SNP majority of 19.3%), East Kilbride and Strathaven (SNP majority of 25.5%), and Bathgate and Linlithgow (SNP majority of 18.4% over the Tories - Labour are third!)

That underlines how ambitious Labour are feeling - but also just how far behind they had fallen by 2019, and how much ground they have to make up.

The Conservative campaign meanwhile has not had quite such a hopeful mood, given the party’s failure to make up ground in the polls.

There was a series of early gaffes at a UK level - Rishi Sunak popping up on the Titanic, before leaving a D-day event early.

And when those stories were pushed out of the headlines, it was because of an even bigger miscalculation by his Scottish leader.

Douglas Ross decided to u-turn on his pledge to leave Westminster, putting himself forward to run for a seat in the north east in the place of David Duguid - who is poorly, but was clearly upset by the move.

There was a predictable backlash, and within days he had announced he would quit as leader after the election.

Mr Ross had painted himself into a corner. Winning the seat would have left him split between Westminster and Holyrood, to the fury of his MSP colleagues.

And if his party does badly enough for him to lose one of their safer seats, he probably would have been in trouble anyway.

The soon-to-be-ex leader largely disappeared from the national campaign for weeks at a time, with his deputy Meghan Gallacher and chairman Craig Hoy fronting the bulk of media events.

The messaging has remained pretty familiar though - focusing chiefly on the SNP, standing up to their ministers at Holyrood and any talk of independence.

But another party has crept into their messaging too in recent weeks. The Tories are clearly worried about the influence of Reform UK, and the thought that they could siphon off enough votes to sink their existing seats, never mind having a chance to target any new gains.

One party which has unquestionably enjoyed the campaign is the Liberal Democrats.

Alex Cole-Hamilton has been like a kid at summer camp, partaking in paddle boarding, archery, falconry.

And somehow he still hasn’t hit the high bar of japery set by his UK leader Ed Davey, who has literally been on a rollercoaster - while also providing one of the moments of real sincerity of the campaign, with his heartfelt party political broadcast about acting as a carer for his son.

In Scotland the party is in a curious position as a result of boundary changes; it is officially defending two seats, despite winning four in 2019.

They are hopeful of restoring those numbers, though. The Lib Dem speciality is digging in around an incumbent, building formidable strongholds.

That hyper-local approach does mean they lack a broad range of targets in other parts of the country, though.

So the party has two hopes. One is to overtake the SNP back into third place at Westminster - winning prestige as well as funding and a regular platform at PMQs.

The other is to build up support in other parts of the country, to spread their reach beyond their heartlands with a view to wider victories in future elections.

There is plenty of choice beyond the four largest parties, of course.

Indeed the 423 candidates registered for this election is the most there has been since 1997 - when Scotland had 72 constituencies, rather than 57.

The Scottish Greens are standing 44 of them, double the number they put forward in 2019.

Having been kicked out of government by Humza Yousaf, they are now free to take the fight to the SNP from the left.

And indeed the Greens have ultimately been more vocal about independence than John Swinney’s party, doing essentially all of the running on the topic in BBC Scotland’s leadersdebate.

Reform UK are standing in every seat in Scotland and are hopeful of picking up votes not just from disaffected Tories, but disgruntled voters generally.

It was striking in the seven-way debates how Nigel Farage and the SNP’s Stephen Flynn were pitching a similar message - of being an insurgent anti-establishment force which would shake up Westminster.

And then there’s the Alba Party, led by Alex Salmond, providing another pro-independence alternative in 19 constituencies.

The Scottish Family Party offer a flavour of social conservatism in 16 more.

Scots have perhaps the broadest range of choices they have ever been offered in a UK election.

And within days, we’ll see exactly how they have chosen.