People wait in front of electoral posters at a bus stop in Seville
People wait in front of electoral posters of prime ministerial candidates Alfredo Perez Rubalcaba, left, of the Spanish Socialist Workers' Party (Partido Socialista Obrero Espanol) and Mariano Rajoy of the center-right People's Party (Partido Popular) at a bus stop in the Andalusian capital of Seville on Saturday. REUTERS

Spaniards are voting in a parliamentary election on Sunday that is expected to throw out the ruling Socialists and bring in a new center-right government to tackle the country's dire economic situation.

A mood of gloom and resignation 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 on the front line of the Eurozone'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 ruling 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 Eurozone's fourth-largest economy and then for bringing in austerity measures that have cut wages, benefits, and jobs.

People now seem resigned to further slashes in spending on health and education in the midst of a European debt crisis that has toppled the governments of Greece, Ireland, Italy, and Portugal, while pushing Spain's borrowing costs ever higher.

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.

He said he was voting for the PP although in the past he had sometimes voted Socialist.

Spain's grim economic outlook hung over the election campaign. The country is home to nearly one-third of the Eurozone's unemployed, with one in five Spanish workers 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 an optimistic front-page headline.

The Vanguardia newspaper alluded to Spain's precarious position in the wider Eurozone 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 cuts seen as necessary to balance Spain's books.

The 56-year-old will not be sworn in until December. But he will be eager to lay out plans during the handover period to reassure fraught markets that have lost faith in the Eurozone project.

Spain's borrowing costs touched euro-era highs in the week running up to the election and came perilously close to the 7 percent level at which other Eurozone nations, such as Ireland and Greece sought international bailouts.

Farewell to Socialists

Voting stations close at 8 p.m. (2 p.m. EST) on Sunday and complete election results are expected a few hours later.

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, since he served in the incumbent's cabinet for years.

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

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.

The austerity measures, along with bailouts and forced recapitalization of banks, have succeeded so far in keeping the country from an international rescue.

(Reporting By Sonya Dowsett; Additional reporting by Fiona Ortiz and Martin Roberts; Editing by Angus MacSwan)