Labour's defeat in the last Scottish parliament elections in 2007 came as a deep shock to the party. The 1979 European elections apart, it had not lost a nationwide election north of the border since 1959. It had come to regard Scotland as its unassailable citadel.

But at least the defeat appeared to be explicable. With Tony Blair finally about to depart 10 Downing Street, the party at Westminster was deeply unpopular. Its campaign made the mistake of assuming enough Scots could be dissuaded from voting SNP for fear that doing so would lead to independence. Meanwhile, the nationalists themselves concentrated on persuading people they could offer Scotland more effective government – and scraped home by just one seat.

Now, four years later, Labour no longer has the albatross of sagging British poll ratings around its neck. Instead the party can remind Scots that the Tories, whom they once again rejected in last May's general election, are back in power at Westminster and, true to form, are inflicting unwanted and unwarranted cuts. Labour can argue too that the SNP minority government in Edinburgh has survived thanks to Tory support. There would seem to be every good reason to expect Scots now to return to their natural political home.

And until very recently, that is precisely what it looked like they would do. Almost every opinion poll taken since last year's UK election put Labour ahead this year's Scottish parliament contest – often by 10 points or more. There was even talk that Labour might come close to securing an overall majority – a task made more or less impossible by the use of proportional representation.

Yet a Labour victory can now no longer be taken for granted. Last month, Labour's poll lead diminished at an alarming rate. By the time the official campaign started, Labour and the SNP were neck and neck. The latest poll, published on Sunday, puts the SNP two to three points ahead.

How have things gone so badly wrong for Labour? In truth, Scottish parliament elections have consistently proven to be a sticky wicket for the party. Many a voter who regularly votes Labour for Westminster switches to the SNP when the focus is on Holyrood. They reason that a distinctively Scottish institution is best run by a distinctively Scottish party.

So Labour's lead was always at risk of narrowing once voters' minds began to focus on the Scottish contest. Meanwhile, remarkably for someone who has been in power for four years, SNP leader Alex Salmond remains highly popular. In contrast, his Labour counterpart, Iain Gray, is both unknown and unloved. Voters seem inclined to believe the SNP would make a better fist of running Scotland – and of standing up to London.

Labour's campaign has failed to reverse these disadvantages – instead they have become more telling. Meanwhile Labour's traditional cry, that an SNP victory would represent the death knell of the union, has lost whatever force it once had. In the last four years the SNP has failed not only to hold a referendum on independence, but also to secure greater public support for their ultimate goal.

But if an SNP victory on 5 May would have few implications for the union, it would be a blow for Ed Miliband. A Labour party that cannot win in Scotland will hardly look like a party back on the road to recovery.

John Curtice is professor of politics, Strathclyde University