London, England (CNN) -- Gordon Brown played offense against the two men hoping to replace him as prime minister at a debate Thursday, but it seems to have done him little good.
David Cameron of the Conservative party topped a poll by YouGov for the Sun newspaper, while Liberal Democrat Nick Clegg came first in a survey by ComRes for ITV News and the Independent newspaper.
Brown unleashed particularly sharp words at Clegg, who had shot up in the polls after last week's debate.
"Nick, get real, get real," Brown said when the politicians were questioned about defense policy.
And he attacked both Clegg and Conservative party leader David Cameron.
"David, you're a risk to the economy. Nick's a risk to our security," he said.
In the YouGov poll, just over a third of debate viewers picked Cameron as the winner, while just under a third saw Clegg as the victor. Brown trailed in third place.
The ComRes poll put Clegg narrowly on top, with 33 percent. Cameron and Brown tied at 30 percent each in the poll. Clegg topped last week's ComRes poll by a much wider margin.
Ladbroke's, a betting shop, also declared Cameron the winner, saying betting shifted heavily to him during a question on immigration at the end of the debate.
Cameron struck an optimistic note in his closing statement, saying the British "need to make a clean break from the last 13 years (of Labour government), to have new leadership to take the country forward to solve the problems that we have, and I think the Conservatives are best placed to offer that ... rather than being stuck with what we have now.
"I still think we have incredible days ahead of us. ... We can achieve anything if we all pull together," Cameron said.
Cameron's Conservatives have held a narrow lead in the polls for several years, but last week's debate -- the first ever during a British election campaign -- shook up the race.
Clegg was widely judged the winner of the first debate, and polls showed the Liberal Democrats shooting from a distant third to first place in many polls.
Brown's Labour party dropped to last place.
The Liberal Democrats are riding high on voter anger against politicians after a scandal over lawmakers' expense claims, campaigning as agents of change.
Clegg closed with an Obama-esque call for hope and change.
Voters are "beginning to hope that we can do something different," Clegg said. "Don't let anyone tell you that this time it can't be different. This time it can."
The refrain in last week's debate was "I agree with Nick," as Cameron and Brown appeared to try to cozy up to the man who could be kingmaker if neither of the main parties gets a majority.
But there was little affection for Clegg on display Thursday.
Cameron, in fact, twice said he agreed with Brown on defense, making a joke of it the second time.
But when the debate turned to benefits for the elderly, Cameron seemed visibly angry at Brown, accusing him of "lying" about Conservative policies.
"Every day Labour is putting leaflets through the doors and they're lies and it makes me angry. Will you withdraw the leaflets? You should be ashamed,"
Cameron demanded, referring to what he said were Labour party advertisements about Conservative plans to cut benefits for older people.
The debate was officially about foreign policy, but the politicians took only four questions in the part of the debate dedicated to the subject: on Europe, Afghanistan, the environment and the visit of Pope Benedict XVI to Britain in September.
They later took questions on immigration, distrust of politicians and other subjects.
Voters cast their ballots on May 6 for lawmakers in 650 districts, or constituencies across England, Scotland, Wales and Northern Ireland. The party with the most lawmakers traditionally gets the first chance to form a government.
It's rare for no party to get a majority, but polls suggest it may happen this year. The last time it happened, in 1974, a new election was called within months.