EDINBURGH — As a Labour Party MP seeking reelection in Scotland, Danielle Rowley is hoping to beat the odds.

Once the country’s dominant political force, the Scottish Labour party finds itself fighting for its life ahead of the U.K. general election on December 12.

According to the polls, Labour is on course to lose six of its seven Scottish seats, including Rowley’s, to the Scottish National Party (SNP) on Thursday — marking the virtual collapse of a political organization that was once said to weigh its Scottish ballots rather than count them.

Rowley’s gamble: that her party’s anti-austerity message will resonate with the Scottish electorate.

“From Day One, people have been open, asking questions, and listening,” the 29-year-old MP told POLITICO between rain-lashed canvassing sessions in her constituency of Midlothian, on the southern outskirts of Edinburgh, where she is defending a majority of just 885 votes.

To some extent, the rivalry that exists between Labour and the SNP represents “the narcissism of small differences,” said Coree Brown Swan, a constitutional researcher at Edinburgh University.

“This is the fastest-growing area in Scotland, but we’re suffering from a lack of investment,” she said. “We want to get things running again after years and years of Tory cuts.”

Rowley’s optimism is admirable. Whether it's justified or not is another question.

For decades, right up until the early 2000s, Labour won election after election in Scotland: Its grip of the country’s political landscape seemed unassailable.

Now, beset by factional infighting, adrift over Brexit and split over how to tackle the fraught issue of Scottish independence, the party is languishing in third place, behind the SNP and Prime Minister Boris Johnson’s Conservatives.

Labour’s decline in Scotland has been precipitous.

The party opposed the country’s effort to break away from the U.K. in the 2014 independence referendum. That put it on the winning side when Scots voted by a 10-point margin against leaving the U.K.

But it was a costly victory. Much of the party’s left-leaning base backed the Yes campaign and then, at subsequent elections in 2015 and 2016, defected en masse to the SNP once the independence question was apparently settled and when the nationalist party, under Nicola Sturgeon's leadership, became the main vehicle for Scotland's social democratic aspirations.

Labour has struggled ever since.

To some extent, the rivalry that exists between Labour and the SNP represents “the narcissism of small differences,” said Coree Brown Swan, a constitutional researcher at Edinburgh University.

“They are competing for the same voters on the left-right spectrum,” she added. “As a result, Labour has struggled to maintain its distinct identity.”

Tense relations

As Scottish voters prepare to vote, Labour is pitching itself as the best way to stop the Conservatives.

“A Labour victory would be an opportunity to reboot our economy and lead a green industrial revolution,” said Lesley Laird, deputy leader of the Scottish Labour Party and the party’s shadow secretary of state for Scotland. “The alternative is a Johnson-Farage-Trump axis hell-bent on driving down living standards and privatizing our NHS.”

Laird believes the radical environmental and economic turn her party has taken under Labour leader Jeremy Corbyn has the potential to transform Scotland, including her own constituency of Kirkcaldy and Cowdenbeath, which suffers from persistently high rates of poverty and unemployment.

A vote for the SNP, she added, “is a vote to stay on the sidelines of this once-in-a-generation struggle to shape our country.”

Relations between Labour and the Scottish nationalists have been tense throughout the election campaign.

SNP chief and Scottish First Minister Nicola Sturgeon has repeatedly attacked Corbyn over his handling of the party’s anti-Semitism crisis.

And yet, in the entirely plausible event of a hung parliament in Westminster on Thursday, Corbyn and Sturgeon will need each other if they are going to block Boris Johnson’s return to No. 10 Downing Street — and the Tory plan to ratify Brexit at the earliest possible opportunity.

UK NATIONAL PARLIAMENT ELECTION POLL OF POLLS

For more polling data from across Europe visit POLITICO Poll of Polls.

In exchange for supporting Corbyn as prime minister, Sturgeon has said she would want a second independence referendum, staged at some point during the latter half of 2020, and the abolition of Trident, Britain’s submarine-based nuclear deterrent, which is stationed on the Scottish west coast.

Corbyn, however, has some red lines of his own.

On a visit to Glasgow in November, he ruled out authorizing another poll on Scotland’s constitutional future during the “early years” of a Labour government, arguing instead that Sturgeon should focus on “ending inequality, poverty, and injustice.”

Corbyn factor

Many of Corbyn’s flagship policies — renationalizing key sectors of the British economy, higher taxes on the rich, and a Green New Deal, for instance — enjoy widespread support, both in Scotland and across the U.K.

But it’s not clear how much traction his pitch is getting with the Scottish public. Unusually for a Labour leader, Corbyn — a polarizing figure at the best of times — is even less popular with Scottish voters than the current Tory prime minister.

“The most recent ratings on Corbyn suggest that around seven in ten Scots think he is doing badly, while just 13 percent think he’s doing well,” said Mark Diffley, an Edinburgh-based pollster. “On a head-to-head, 29 percent say they would prefer Johnson as prime minister as opposed to 23 percent who would rather see Corbyn — although almost half can’t decide between the two.”

Although some Scottish Labour activists are angry about Corbyn’s apparent willingness to accommodate nationalist demands for a second independence poll, others view it as a necessary step towards the party’s renaissance north of the border.

“You have the SNP campaigning for independence and the Tories campaigning for Brexit. We’re the only party that’s standing up for the issues that actually affect people’s daily lives” — Labour candidate Danielle Rowley

As long as Labour is competing directly with the Conservatives for unionist votes, the latter group argues, it will never be able to win back younger, more progressive Scots — an estimated 70 percent of whom now favour independence.

Scottish Labour needs to abandon the “crude anti-nationalism” that has traditionally guided its approach to constitutional politics and embrace a radically decentralizing agenda, said Ewan Gibbs, an academic at the University of the West of Scotland and prominent party member.

“The principle of federalism is enshrined in Labour policy, and Corbyn has discussed hosting a U.K. constitutional convention after the election,” he said. “The momentum for that needs to be built now.”

‘Highly marginal’

In sharp contrast to Scottish Labour, the SNP enters the final days of the election in a commanding position.

Analysts say the party — whose campaign has focused heavily on the twin themes of securing independence and stopping Brexit — could win up to 45 of Scotland’s 59 Westminster seats.

But the result is by no means a forgone conclusion.

A quarter of all Scottish constituencies are “highly marginal” — meaning they have majorities of under 1,000 votes — and more than half have majorities of under 3,000 votes.

Consequently, minor variations in local voting patterns could help tip the balance for or against candidates in multiple Scottish races, including the knife-edge battleground of Midlothian.

Danielle Rowley is certainly hoping for an upset against her nationalist challenger, the former Midlothian council leader Owen Thompson.

“Everything is at stake in this election,” she said. “You have the SNP campaigning for independence and the Tories campaigning for Brexit. We’re the only party that’s standing up for the issues that actually affect people’s daily lives.”

If Rowley prevails Thursday, Labour might still — just — have a future in Scotland.

That, however, is a very sizeable “if.”

Sign up for free to POLITICO’s UK 2019 Election Sprint newsletter and catch up with our daily snapshot of key moments in the run up to the U.K.’s December 12 general election and immediately afterwards.