Editorial Comment: When the Glenrothes by-election was called, bookmakers were quoting odds of 4/1 on an SNP victory, despite a previous Labour majority of more than 10,000.

When the Glenrothes by-election was called, bookmakers were quoting odds of 4/1 on an SNP victory, despite a previous Labour majority of more than 10,000. Mid-term by-elections are invariably a thorn in the flesh of the government and this one had just suffered a humiliating defeat in Glasgow East, supposedly one of the safest Labour seats in Britain. Labour's majority in Glenrothes was smaller, as was the swing required for the SNP to take it and privately many in the Labour camp had already written it off. Commentators spoke of a shoo-in for the SNP and there was talk of it spelling the demise of Gordon Brown's leadership.

In this context, it is hard to exaggerate the significance of Lindsay Roy holding Glenrothes for Labour. Is this a signal that the "Brown bounce" is gaining momentum and the SNP's honeymoon is finally ending?

The Prime Minister's handling of the banking crisis may have drawn plaudits from around the world. In Fife, however, it was issues closer to home that appear to have decided this election. Labour targeted the steep increases in home care charges suffered by some as a result of the imposition of means testing by SNP-controlled Fife Council and their attempt to make the contest a "referendum on home care charges" appears to have been effective. The fact that the SNP candidate, Peter Grant, is strongly identified with this unpopular decision may have proved decisive. In this instance, it was the SNP rather than Labour that paid the price of being the incumbent power, obliged to make hard decisions.

Alex Salmond made frequent visits to the constituency during the campaign, hoping to capitalise on popular decisions, such as the abolition of Fife's bridge tolls and the freezing of council tax. However, his administration's proposals to replace council tax by local income tax remain unconvincing.

Labour's victory is all the more remarkable given the limitations of its campaign. The SNP managed to put far more feet on the ground and almost certainly outspent Labour by a large margin. Appearances by Gordon Brown, who broke a self-imposed rule about by-election campaigning, and by his wife, Sarah, suggested that Labour was struggling to get its vote out.

Ultimately, it clearly succeeded, which is a tribute to Lindsay Roy, a well-known and respected church elder and high school headteacher.

This contest will go down in history as the by-election that could have ended Gordon Brown's career but did not. Indeed, even without this result, Mr Brown would have survived because the banking crisis has transformed the political landscape. However, the "Brown bounce" could easily turn into the Brown crash. The challenge for Gordon Brown, and now for Fife's only other Labour MP, Lindsay Roy, is to do their utmost to save those they represent from the worst effects of the credit crunch. It is unclear whether last night's result represents a turning point for Labour or merely a brief respite.