Liberal Democrat leader Nick Clegg has hailed his party's success in the Eastleigh by-election, telling activists in the Hampshire town: "We held our nerve, we stood our ground... we overcame the odds and we won a stunning victory."
The Lib Dems held off a late surge by the UK Independence Party (Ukip) to win the by-election but Prime Minister David Cameron was dealt a serious blow as the Conservatives were pushed into third place.
Mr Cameron acknowledged that the result was "disappointing" for his party but insisted he was "confident" that in the 2015 general election the Tories would be able to win back the protest voters who deserted them in the poll.
Speaking in 10 Downing Street, the Prime Minister said: "It is a disappointing result for the Conservative Party, but it is clear that, in mid-term by-elections, people want to register a protest. But I am confident that at the general election we can win those people back by demonstrating that we are delivering for everyone who wants to work hard and wants to get on. That is what we will be focused on."
Visiting Eastleigh to congratulate his party's new MP, Mike Thornton, Mr Clegg said the message for Lib Dems from the poll was that "we can be in government and still win".
Addressing cheering supporters at Hampshire Cricket Club's Ageas Bowl ground, Mr Clegg said: "This has been a by-election we've had to fight in exceptionally difficult circumstances. Our opponents have thrown everything at us. We held our nerve, we stood our ground, we worked as a team, we went out and campaigned on every doorstep, we overcame the odds and won a stunning victory."
Mr Thornton won the by-election - triggered by the resignation of disgraced ex-Cabinet minister Chris Huhne - with 13,342 votes, a majority of 1,771 over Ukip's Diane James, who said beating the Tories was a "humongous" shock which represented a "seismic shift" in UK politics. Jubilant Lib Dem president Tim Farron said the result meant that 20-30 Tory seats were now vulnerable to the party in the 2015 general election.
But Conservative Education Secretary Michael Gove insisted that the party would not be blown off course by its defeat and would resist backbench calls for a shift to the right on issues like immigration and gay marriage.
Ukip leader Nigel Farage described the result as a "massive boost" for his party ahead of English county council elections in May and next year's European Parliament polls - when he said Ukip would cause "an earthquake" in British politics. "People will say it was a protest vote, but who we attracted here were non-voters who had not voted for 20 years - they are not protest votes," he said.
Mr Farage, who had pondered standing himself, said he would not have done any better than Ms James and joked: "If the Conservatives hadn't split our vote we'd have won, wouldn't we?"