The Liberal Democrat who dealt Labour a massive by-election blow has said his party "engaged with issues that mattered most to local people".
Willie Rennie gets the thumbs up during a victory walk
Willie Rennie overturned a Labour majority of 11,000 to win the Westminster seat in Dunfermline and West Fife by 1,800 votes.
The constituency, which borders that of Chancellor Gordon Brown, was one of Labour's safest heartland seats.
Labour said local issues such as Forth Bridge tolls were to blame.
Hospital cutbacks, the state of Dunfermline town centre and 700 job losses at a printer factory announced on the day Labour launched its campaign, also contributed to the loss of the seat, according to Scottish Secretary Alistair Darling.
He told BBC Radio 4's Today programme: "It was a very bad result for us, let's make no bones about it. This was a safe seat, we should not have lost it.
"We were the government party, people coalesced around the Liberals, they wanted to send a very clear message.
"We have got to learn from that and make sure that we don't make that mistake again.
"It was the local stuff that actually did for us. People saw that the Tories were absolutely nowhere, the Nationalists have just flatlined. They [voters] piled in behind the Liberal Democrat and we paid the penalty."
Speaking before the Labour Spring Conference in Blackpool, Deputy Prime Minister John Prescott said: "We're all disappointed; we did our best, we always wanted to win."
Scottish Liberal Democrat leader Nicol Stephen said it was a sensational result for his party.
Referring to Gordon Brown's involvement he said: "It's not just No 10 Downing Street that will be rocked by this, it will have a big impact in No 11 as well."
The Lib Dems denied the victory was solely based on local issues although Mr Rennie admitted they had played a part.
Willie Rennie (Lib Dem) 12,391
Catherine Stihler (Lab) 10,591
Douglas Chapman (SNP) 7,261
Carrie Ruxton (Cons) 2,702
John McAllion (SSP) 537
James Hargreaves (SCP) 411
Thomas Minogue (AFBTP) 374
Ian Borland (UKIP) 208
Dick Rodgers (CG) 103
The new MP said: "It was a fantastic campaign. We engaged with the issues that mattered to local people in this constituency.
"People knew that we were the main challengers to Labour in this seat and they gave us that support to try to get Labour out.
"The Labour Party must be very worried about the Liberal Democrat advance, especially right next to Gordon Brown's own seat.
"I've got three or four years to prove I am worthy to be the MP in Dunfermline and West Fife and I will be working hard to win more of their trust to make sure I win it next time."
The Scottish National Party retained third place in the contest and the Conservatives were fourth, despite new leader David Cameron making a personal appearance in the campaign.
Conservative Shadow Scottish Secretary David Mundell MP insisted he was happy with the response their candidate, Carrie Ruxton, had received.
He said: "On the day many Tories decided that the Lib Dem candidate was the best chance of sending a message to the Labour government and Gordon Brown that they are fed up of being taken for granted."
The nationalists said the Liberal Democrats had used "weapons of mass deceit" in the campaign.
SNP leader Alex Salmond said: "While they ran a shameless anti-government campaign here in a Westminster by-election, they are part of the discredited government at Holyrood and so cannot hope to repeat this feat at a Scottish election."
The by-election was caused by the death of the Labour MP Rachel Squire, who had won the seat at the General Election just nine months ago.