A grim mood dominated as people went to the polls against a background of soaring unemployment, cuts in public spending and a debt crisis that has put Spain in the front line of the euro zone's fight for survival.

"Being a civil servant I'm not optimistic," said Jose Vasquez, 45, who was among the early voters in the capital Madrid.

"We can choose the sauce they will cook us in, but we're still going to be cooked."

Pre-election opinion polls gave the conservative People's Party (PP), led by Mariano Rajoy, an unassailable lead over the Socialists, who have led Spain from boom to bust in seven years.

Voters are angry with the Socialists for failing to act swiftly to prevent the slide in the euro zone's fourth-largest economy and then for belatedly bringing in austerity measures that have slashed wages, benefits and jobs.

Yet people now seem resigned to further cuts, including in health and education, in the midst of a European debt crisis that has toppled the governments of Ireland, Portugal, Greece and Italy and pushed Spain's borrowing costs to critical levels.

Spain's bleak economic outlook hung over the election campaign. One in five Spanish workers are without a job and its economy is threatening to slip into recession next year for the second time in three years.

"Something's got to change here in Spain, with 5 million people on the dole, this can't go on. People like us just want to work." Juan Antonio Fernandez, 60, an unemployed construction worker said as he voted in rain-swept Madrid.

Rajoy, who led his party in two previous failed parliamentary election campaigns, is likely to win an absolute majority giving him a clear mandate to enforce the deep and painful cuts seen as necessary to balance Spain's books.

"I'm prepared to do what Spaniards want," Rajoy said after he voted in the wealthy Madrid neighborhood of Aravaca.

The 56-year-old will not be sworn in until December but he is likely to swiftly lay out his plans during the government handover to reassure fraught markets.