David Cameron has accused the Lib Dems of fighting a "dirty" and "personal" campaign in Bromley and Chislehurst.
Recriminations have begun after the Tory majority was slashed
The Conservatives narrowly retained the seat in a by-election triggered by the death from cancer of Eric Forth.
The Tory victor said Lib Dems should "look in a mirror" if they wanted to know why voters were put off politics.
Lib Dem leader Sir Menzies Campbell said he had "put a stop" to activists who had begun campaigning before Mr Forth's funeral.
But he denied Tory candidate Bob Neill's accusation that the Lib Dems had fought an unscrupulous campaign.
"If there had been any question of impropriety you can be certain I would have stepped in and stopped it," said Sir Menzies.
Lib Dem candidate Ben Abbotts claimed Mr Neill did not live in the area, dubbing him "three jobs Bob from the East End" - a reference to the fact that he sits on the board of a health authority, leads the Tory group on the Greater London Assembly and is a barrister.
The UK Independence Party also got into a spat with Mr Neill, who threatened to sue over a UKIP poster accusing him of favouring "unlimited immigration".
In the vote Labour was pushed into fourth place behind UKIP and the party also failed to regain the Blaenau Gwent seat which was won by Independent Dai Davies.
That by-election was caused by the death of Peter Laws from a brain tumour. He had overturned Labour's 19,000 majority in May 2005.
Mr Cameron said he was delighted Mr Neill had won Bromley and Chislehurst even if the margin had been disappointing.
But he added: "My impression is that very personal, very negative campaigning that the Liberals do - they often do it, they do it a lot and it is damaging and I think it is bad for politics.
"I think that probably had an effect. Obviously we will have a good look to see what lessons there are to learn."
Following his win, Mr Neill accused the Liberal Democrats of fighting their election campaign with the "most vigorous and underhand example of cynical personal abuse" that he had encountered in his 30-year political career.
He told them: "If you sometimes wonder why it is that people in this country are turned off by politics, get a mirror and look at yourselves."
Sir Menzies praised his party's near-miss as a "stupendous result" in "one of the safest Conservative seats in the country".
"It shows that there is no confidence in Cameron's Tories in the Conservative heartlands," he said.
Sir Menzies added that the results in both Blaenau Gwent and Bromley were a "complete rejection of the Labour government".
Labour party chairman Hazel Blears said Blaenau Gwent was a "unique set of circumstances" branding the situation in the Welsh constituency a "family feud".
Majority of 633
She said Labour had not had enough time to turn it round from the general election but insisted the result was "coming in the right direction".
She said the Bromley result was an "absolute disaster" for Mr Cameron's Tories.
"What you've got here is a classic by-election with the Liberal Democrats campaigning really hard, they have a by-election machine," she said.
"And people vote tactically in by-elections, and clearly there was a move here to vote anything but for the Tory party so everybody got behind the candidate that they thought could beat David Cameron's nominee," she told BBC Breakfast.
It comes as a YouGov poll for the Daily Telegraph suggested Mr Cameron is more popular than Tony Blair and that 6% more people would prefer a Tory government led by Cameron to a Labour one led by Gordon Brown.
Mr Neill received 11,621 votes, edging him just ahead of Liberal Democrat Ben Abbotts with 10,988. Mr Forth had been re-elected in 2005 with a majority of 13,342 votes.