Gordon Brown's premiership was given a major lift today as Labour won the Glenrothes by-election by an unexpectedly comfortable margin.

Gordon Brown's premiership was given a major lift today as Labour won the Glenrothes by-election by an unexpectedly comfortable margin.

In the latest milestone for the Prime Minister's political fightback, the victory was hailed as a personal endorsement of his leadership through the economic downturn.

He wasted no time in claiming the win was a vote of confidence for the Government's response to the turmoil.

"What I have learned from this by-election is that people are prepared to support governments that will help people through the downturn and offer real help to people," he said.

"They are less willing to support people who have no idea about how to solve the problems we have got."

Despite having all but written off the by-election in recent weeks, Labour held Glenrothes in the early hours of this morning with a majority of 6,737 over the Scottish National Party.

It is the strongest evidence so far that the premier has improved Labour's electoral prospects markedly in the six weeks since his job looked on the line at the party's annual conference.

Foreign Secretary David Miliband, who was seen to be positioning himself for a leadership bid in the summer, said today's result was a "very strong and well deserved vote of confidence in the Prime Minister".

Scottish Secretary Jim Murphy described the win as a "very strong personal endorsement" of Mr Brown, who had broken with recent prime ministerial convention by campaigning twice in the seat.

The result prompted suggestions that the honeymoon was over for Alex Salmond's SNP, which failed to repeat its success in Glasgow East in July, when it overturned Labour's 13,500 majority.

Although Labour's majority was down a third on its 10,660 margin in 2005, its local candidate, Lindsay Roy, increased the party's share of the vote.

The size of the victory was against all the odds given the party's decline in the polls since the last general election.

The Tories and the Liberal Democrats both lost their deposits, having both failed to notch up 5% of the votes cast.

Conservative leader David Cameron, whose poll lead over Labour has been slashed over the past few weeks, deflected attention from the so-called "Brown bounce" onto the SNP.

On a visit to Glasgow, he said: "The real loser is the Scottish National Party and as they want to break up our country, to destroy the Union that I'm passionate about, then maybe it's no bad thing that the 'Salmond bounce' has disappeared.

"The Conservative Party has now established itself as the third party and that's progress for us. We've still got a long way to go."

But he could not resist a swipe at Mr Brown, whose Kirkcaldy and Cowdenbeath constituency neighbours Glenrothes.

"I don't just go to by-elections in my own backyard, I go wherever Conservative candidates are standing," he said.

SNP deputy leader Nicola Sturgeon insisted that her party was still making progress even if it had not performed as well as had been hoped.

"The vote of the SNP went up by 13% from the last general election, we secured a 5% swing and we slashed Labour's majority," she said.

"I won't pretend not to be deeply disappointed, I want to win every election we contest. But we did make progress last night."

Speaking to reporters this morning, the Prime Minister insisted his attention - and that of his ministers - would remain focused on the current economic test.

As he prepared to travel to Brussels for an informal European Council meeting on the financial crisis, Mr Brown brushed off questions about Labour's prospects of winning the next general election.

"My undivided focus is on mortgage holders who are having difficulties, homeowners worried about their homes, people worried about their jobs, people worried about gas and electricity prices," he said.

"We've got a global recession that I believe we in Britain are dealing with as fairly as we can and will continue to take the measures that will give real help to people in difficult circumstances."

Mr Brown restated his call for banks to pass on to customers yesterday's 1.5 percentage point cut in the interest rate cut and said fiscal policy - tax and spend - would complement such efforts to stimulate the economy.

"We have shown that we will take the necessary action, in monetary policy with cuts in interest rates and in the action we've taken on taxes and spending to ensure that we can come through this downturn," he said.

"All the decisions we are taking are to be fair to hard-working people.

"In other downturns, hard-working families, people on middle and low incomes have not had the support that we are now prepared to give and trying to give over this difficult period of time." Mr Brown again dismissed suggestions of a possible snap General Election when he faced questions after an EU summit in Brussels on the economic crisis.

"When I get up in the morning and before I go to bed at night, these are the issues that I am thinking about: how we can help mortgage holders, homeowners; how we can help small businesses; how we can help people in their jobs.

"That is the first and foremost thought in my mind and that is what I will continue to do until we get through this economic downturn."

He also denied receiving a phone message last night before the result was declared, informing him that Labour was set to lose.

"I did not receive any text messages last night," he said.

The PM refused to speculate on the possibility of tax cuts in this autumn's Pre-Budget Report.

One Labour MP warned today that the respite gained by Mr Brown from the Glenrothes result may not last beyond the spring.

Graham Stringer - who as recently as September was calling for a leadership contest to replace Mr Brown - told BBC Radio 4's PM programme: "I don't think the electorate would thank us for looking at our own navels at the moment, so I don't think there should be a leadership challenge now.

"That gives us a chance to re-establish the trust of the electorate, but if it doesn't happen, then those debates and discussions will reappear next April or June. I hope that things are much improved by then."

The Manchester Blackley MP said Mr Brown had shored up his position not only by his response to the economic crisis, but also by carrying out an effective Cabinet reshuffle, halting divisive briefings by "creatures of the dark" in Downing Street and improving the management of parliamentary business.

But he compared Glenrothes to the "false dawn" of the Darlington by-election won by Labour in 1983, which put an end to speculation over a challenge to the leadership of Michael Foot, but was followed only months later by landslide defeat in the General Election.

"I don't know whether the Glenrothes election is a false dawn. I hope it isn't," said Mr Stringer.

"I hope we continue to improve, but the Government's performance will be measured by the electorate and also by MPs and the Labour Party over the next six to eight months."