ALEX SALMOND, Scotland's first minister, did not seem to have much going for him when he first set out to win re-election to the parliament at Holyrood on May 5th. His Scottish National Party (SNP) lagged far behind Labour, which looked set to return to power in Scotland, as well as winning outright victory in Wales and picking up hundreds of council seats in England. Labour's Scottish leader, Iain Gray, accused Mr Salmond and his minority government of a string of broken promises, such as failing to cancel student debt. Yet now opinion polls suggest a remarkable turnaround (see chart).

Mr Gray's campaign got off to a bad start. On April 7th he was ambushed at Glasgow Central railway station by demonstrators against budget cuts and scurried for refuge into a nearby sandwich shop, all in the glare of television cameras. Mr Salmond, in contrast, has had almost daily endorsements by celebrities ranging from pop stars to prominent businessmen and even opposition politicians, all stressing his leadership and competence. His performance in televised debates against the more diffident Mr Gray has been assured. In a survey this month by YouGov, a polling firm, 52% of those asked said Mr Salmond would make the best first minister. Only 27% chose Mr Gray.

Labour had hoped to pick up lots of votes from Liberal Democrats unhappy about their party's Westminster coalition with the Conservatives (who are, despite valiantly cheerful efforts by their Scottish leader, Annabel Goldie, still a toxic brand locally). But it seems to be the SNP that is winning over disgruntled Lib Dems.

North East Fife, for example, has been safe Lib Dem territory since the party's former leader, Sir Menzies Campbell, won the Westminster seat from the Tories in 1987. But the coalition's spending cuts are biting. The Royal Air Force station at Leuchars, just north of the university town of St Andrews and thought by Fife council to support some 1,900 jobs, is threatened with closure. So is a coastguard station nearby. With polls showing that the SNP is close to getting the 10% swing from the Lib Dems across Scotland that they would need in the seat to win it, the Nats scent a scalp.

On a balmy Easter weekend with trippers filling the cafés, St Andrews looks comfortably prosperous, hardly a nationalist hotbed. A student reckons that, though the Lib Dems have hurt themselves badly by reneging on their election pledge not to raise university tuition fees south of the border, the student vote north of it is still pretty solid: devolved Scotland does not exact tuition fees from Scottish undergraduates. But local people sense the ground is shifting. “I think it may be very close, what with the way the Lib Dems down in England have banded with the Tories,” says a technician. A golfer agrees. And it is not Labour which stands to profit.

That is mainly because the SNP's appeal is curiously wide-spectrum. Though the party claims to be left of centre (and its statist agenda on public services—free social care for the elderly, free prescriptions and so forth—certainly is), much of its message is tax-cutting and right-wing. For the past four years the SNP has frozen council-tax bills and it says it will do so again until 2016, outbidding other parties who are promising, at best, a two-year freeze. It has also cut local rates for small businesses and promises more support to come. “Scotland has drifted somewhat to the right, mirroring the drift in Britain generally,” says John Curtice, a psephologist at Strathclyde University. The Tories—honestly but throat-slittingly insistent that the budget deficit must be cut—are not in line to get all of the centre-right vote.

Things could still change. Peter Kellner, president of YouGov, says that one in five people who would vote Labour in a Westminster election plan to vote SNP in the Holyrood one. But Labour went on the attack this week: Mr Gray relaunched his campaign; Ed Balls, the shadow chancellor, visited Edinburgh; and word is that Gordon Brown, the previous prime minister, is poised to hit the campaign trail hard.

Their message is that if the SNP gets in with an increased majority, it will push Scotland towards independence, which Scots take a distinctly dimmer view of than they do of Mr Salmond: only 35% favour it, according to a poll published on April 24th. Unsettling talk of breaking away from Britain, said Mr Gray in a speech the following day, would cause economic uncertainty, turn off investors and cost jobs. It is probably too late for Labour's national heavy-hitters to save the party's flagging campaign in Scotland, but they may claw back a few seats.