Spaniards reeling from an economic crisis voted on Sunday in an election expected to throw out the ruling Socialists and bring in a centre-right party which promises only harsher austerity measures.

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 about it as we're already seeing the cuts coming through, 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 in power.

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.

At least we'll see a change in stance. They (the PP) seem more technical to me, it seems they understand the situation better and are more serious than the guys we have now, said Juan Costas, a 73-year-old retiree.

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.

Today the nightmare is over, the right-wing Gaceta newspaper said in a front-page headline.

The Vanguardia newspaper alluded to Spain's precarious position in the wider euro zone crisis. Europe is watching us, read its banner headline.

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 neighbourhood 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.

Underlining the fragile situation, Spain's borrowing costs hit euro-era highs during the election campaign, almost reaching the 7 percent level at which other euro zone nations like Ireland and Greece sought international bail-outs. Growth has stalled.

FAREWELL TO SOCIALISTS

Prime Minister Jose Luis Rodriguez Zapatero decided against running for a third term as his approval ratings sank.

The Socialists chose veteran politician Alfredo Perez Rubalcaba as their leader for the campaign, but he struggled to differentiate himself from Zapatero, having served in his cabinet for years.

Spain joined the euro in 1999 and enjoyed years of prosperity and a real estate boom driven by cheap credit. When the property market crashed in 2007 the government, companies and consumers all found themselves over their heads in debt.

We have to do something. What we were doing was not enough, things were just getting worse and worse. We have a frightful situation with 5 million unemployed and a million and a half with no income. Thank God I haven't lost my job, said Luis Escobar, a 50-year-old hotel worker.

The best social policy is to create jobs. The guys in power haven't done anything so if you want things to change you have to do something, he said, adding that he would vote for the People's Party.

Some regions, notably southern Andalucia, heartland of Spain's tourist industry, have been hit worse than others.

In the Basque Country, people were voting for the first time in years without the threat if violence after the separatist guerrilla group ETA announced last month that it was giving up its armed struggle.

The traditionally prosperous northeastern region has been relatively unscathed by the economic storm and most voters were expected to back pro-independence parties.

For the time being I've got a pretty good pension and the crisis hasn't affected me yet. Of course it will reach me, said 81-year-old Laureano Agirremota in the industrial city of Bilbao. I've always voted the same, for the Basque Nationalist Party.

(Additional reporting by Fiona Ortiz, Sonia Dowsett in Madrid and Arantza Goyoaga in Bilbao, writing by Angus MacSwan, editing by Barry Moody)