Lib Dem leader Nick Clegg made several visits to the constituency
Liberal Democrat leader Nick Clegg said his party "held its own" in the Crewe and Nantwich by-election, despite coming third with 14.6% of the vote.
He said his candidate Elizabeth Shenton achieved a "respectable result" in the face of "an enormous national squeeze".
Mr Clegg said it was a vote against Prime Minister Gordon Brown, not in favour of a Conservative government.
On Thursday the Tories overturned a 7,000 Labour majority in their first by-election gain since 1982.
Conservative candidate Edward Timpson took 20,539 votes, Labour's Tamsin Dunwoody was second on 12,679, while Ms Shenton was third on 6,040.
Mr Clegg said: "It was a respectable result in difficult circumstances for us. "It was an enormous national squeeze this was a seat where the Conservatives had poured in quite a lot of resources over a long period of time.
"They were well placed to pick up the disillusionment with Gordon Brown. It was a vote though, at the end of the day, against Gordon Brown, rather than in favour of a Conservative government in my view."
He added: "You lose some, you win some. There'll be many other by-elections to come where I'm absolutely confident we'll do extremely well."
Earlier the party's home affairs spokesman Chris Huhne said third parties in by-elections often got squeezed to 3% or less of the vote.
Lib Dem chief executive Lord Rennard said the Lib Dem vote had been "really rather robust" in an area where the party had always been in third place.
He said a party that begins in third place "rarely does well in a by-election".
Lib Dems: 6,040
But he said the Lib Dems had not suffered "anything like the sort of squeeze" Labour and the Conservatives had done in previous by-elections.
And he told BBC Radio 4's Today programme that the Lib Dems had made gains in "traditional Labour heartlands" in St Albans, Hull and Sheffield in the recent local elections, adding: "It's the Liberal Democrats who are challenging, not the Conservatives."
In her speech, Ms Shenton told the government: "You need to know that you were very wrong when you supported a budget that taxed people on ordinary incomes more than the rich.
"The people who elected a Labour government did not expect it to behave like a Conservative one."
Mr Timpson's victory in what had been considered a "safe" Labour seat represented a 17.6 swing from the 2005 general election - which Labour's Gwyneth Dunwoody had won with a majority of 7,078.