Spain's PM Jose Luis Rodriguez Zapatero exchanged angry words with his conservative rival in their second and final pre-election TV debate.
Despite the smiles, the candidates accused each other of lying
Spanish opinion polls indicate that Mr Zapatero came out on top in the debate.
The Socialist leader came top in four polls after the debate, watched by 11.7 million people. The vote is on Sunday.
He and Popular Party leader Mariano Rajoy called each other liars as they argued over the economy, immigration and terrorism on Monday night.
Previous polls suggested the Socialists were about 4% ahead of the PP in the run-up to the election.
A poll for the TV station Cuatro gave Mr Zapatero 50.8%, against 29% for Mr Rajoy.
A poll for La Sexta television put Mr Zapatero on 49.2% and his rival on 29.8%, with 21% calling it a draw.
Mr Rajoy accused the government of weakness on the issue of immigration.
But the contribution of immigrants to Spanish society was defended by Mr Zapatero.
"You are trying to trick the Spanish people. You've only worried about the economy in the last few weeks," Mr Zapatero told Mr Rajoy during the debate.
"You don't care about the economy. You couldn't give a damn," the prime minister said.
Hitting back, Mr Rajoy said it was the governing Socialists "who don't care about the economy because you've been occupied with other matters".
"You've lived off inertia and what you inherited. The difference between rich and poor is much greater in Spain today," the PP leader said.
Mr Rajoy also accused the government of negotiating "with terrorists" from the Basque separatist group, Eta.
"You've lied to me, to Congress and to the Spanish people. I'll support a government that wants to defeat Eta, not negotiate with them," the conservative leader said.
Mr Zapatero last June admitted holding high-level talks with Eta in an attempt to seek a negotiated end to violence.
The Spanish government broke off the talks after an Eta car bomb killed two men in a car park at Madrid airport in December 2006.
During the debate, the two rivals also clashed on immigration.
Mr Rajoy said that "uncontrolled immigration is a danger", while Mr Zapatero argued that partnership agreements with African governments had helped reduce the flow of illegal immigrants.
Spain accounts for well over one-third of all net immigration into the European Union.
Mr Rajoy chose immigration as his main line of attack, the BBC's Steve Kingstone reports from Madrid.
His hope is that Spaniards - who are already coping with rising food prices and unemployment - may quietly agree that too many foreigners are not helping the situation.
That has enabled the government to accuse Mr Rajoy of xenophobia.