Labour's one-seat defeat at the hands of the Scottish National Party in 2007 was a big shock for the party. But at least it could be blamed on dissatisfaction with Tony Blair's government in London, compounded by a reluctance to air disagreements with the UK government in public.
No such difficulties are in Labour's way this time: the party is riding reasonably high in the polls and the Tories are back in power at Westminster despite having been rejected yet again by voters north of the border.
As late as mid-March this seemed to be succeeding. Then everything went wrong. By the end of March, the SNP were neck-and-neck with Labour. Then the SNP bandwagon rolled. Under the proportional representation system in use, voters have one vote for a constituency MSP and another for a party list.
On average, the most recent polls put the Nationalists 12 points ahead on the constituency vote, though by a more modest seven points on the more important vote for the party lists.
Unfortunately for Labour, voters in Scotland do not regard their parliamentary elections as an opportunity to send a message to Westminster. They are also looking for an effective government in Edinburgh. The charismatic First Minister, Alex Salmond, has remained popular in his four years in office. Despite many broken promises, his government is widely thought to have done a reasonable job.
Labour has offered little in the way of distinctive policy ideas that might help persuade the public it could do a better job. Realising its mistake, in the last 10 days Labour focused its attacks on the Nationalists' plans to hold a referendum on independence. The SNP has failed to make any progress during the last four years in persuading Scots of the merits of leaving the UK – support for that remains at no more than about a quarter.
But opponents of independence still appear willing to back the SNP. Mr Salmond has declared he will not hold a referendum until the second half of the next government's term.
Labour's position in Wales is very different. It has embraced its nationalist opponents, Plaid Cymru, in coalition. Being junior coalition partners appears to have drawn Plaid's sting and ensured Labour faced little competition for the anti-coalition vote in Wales.
Since the autumn, Labour has regularly polled above 40 per cent and it might even manage, for the first time, to secure an overall majority. Ed Miliband seems more likely to prefer Cardiff to Edinburgh as his chosen destination on Friday.
John Curtice is professor of politics at Strathclyde UniversityReuse content