Mariano Rajoy's centre-right People's Party stormed to a crushing election victory when voters punished the outgoing Socialist government for the worst economic crisis in generations.
Rajoy, who led his party to an absolute parliamentary majority in Sunday's election, is widely expected to push through drastic measures to try to prevent Spain being sucked deeper into a debt maelstrom threatening the whole euro zone.
Difficult times are coming, Rajoy, 56, told supporters in his victory speech, with financial markets hungry for details on how he will attack a steep public deficit threatening to push the euro zone's fourth economy towards a perilous bail-out.
Spain's voice must be respected again in Brussels and Frankfurt... We will stop being part of the problem and will be part of the solution, said Rajoy, who is not scheduled to take office for a month.
Voters vented their rage on the Socialists, who led Spain from boom to bust in seven years in charge. With 5 million people out of work, the European Union's highest jobless rate, the country is heading into its second recession in four years.
Spaniards were the fifth European nation to throw out their leaders because of the spreading euro zone crisis, following Greece, Portugal, Ireland and Italy.
The People's Party (PP), formed from other rightist parties in the 1980s after Spain returned to democracy at the end of the Franco dictatorship, won the biggest majority for any party in three decades.
The PP took 186 seats in the 350-seat lower house, according to official results with 99.95 percent of the vote counted.
The Socialists slumped to 111 seats from 169 in the outgoing parliament, their worst showing in 30 years.
Spain's stock and bond prices may initially react positively to the vote because Rajoy, a former interior minister, is seen as market friendly and pro-business.
Rajoy, who will not be sworn in until around December 20, will not get much breathing space.
The nation's borrowing costs are at their highest since the euro zone was formed and yields on 10-year bonds soared last week to close to 7 percent, a level that forced other countries like Portugal and Greece to seek international bail-outs.
The Spanish Treasury heads back to the markets with debt auctions on Tuesday and Thursday this week, which will test confidence in Rajoy's pending leadership
The fact the PP has won by a large majority is a very good sign for the markets. It means stability, said Teresa Sabada, professor of political communication at IESE business school in Madrid.
The best scenario now would be for Spain to announce some new emergency austerity measures but I am not sure whether this will happen or not.
Economic gloom dominated the election campaign, with more than 40 percent of young Spaniards unable to find work and a million people at risk of losing their homes to the banks.
Being a civil servant I'm not optimistic, said Jose Vazquez, 45, after he voted in Madrid.
We can choose the sauce they will cook us in, but we're still going to be cooked.
Many leftist voters are concerned Rajoy will cut back Spain's treasured national health and education systems.
Too soured with the Socialists, they turned to smaller parties or stayed away from the polls. The abstention rate was higher than in the last election in 2008.
The United Left, which includes the former communist party, won 11 seats in the lower house, its best showing since the mid-1990s and way up from the previous legislature when it had only two seats.
Small parties doubled their presence in the lower house of parliament, taking 54 seats compared with 26 in the last legislature.
Rajoy has been cagey about exactly where he will cut public spending, but he has pledged to meet the country's target to trim its public deficit to 4.4 percent of economic output next year, which implies drastic measures.
But he risks pushing Spain back into its second recession in four years and provoking massive street protests.
When the Socialists took power in 2004 Spain was riding a construction boom fuelled by cheap interest rates, infrastructure projects and foreign demand for vacation homes on the country's warm coastlines.
Droves of young men dropped out of high school to take building jobs and bought flashy BMWs with their inflated wages.
But the government, consumers and companies were engulfed in debt when the building sector collapsed in 2007, leaving the landscape dotted with vacant housing developments, empty airports and underused highways.
Something's got to change here in Spain, with 5 million people on the dole, this can't go on, said Juan Antonio Fernandez, 60, a jobless Madrid construction worker who switched to the PP from the Socialists.
Pablo Cortes, 27, who can find only occasional restaurant work despite his degree in architecture, saw no reason for optimism from the result.
Does anyone really believe the PP is going to solve this? How, with more austerity for the have-nots and favours for the rich? he said.
(Additional reporting by Nigel Davies, Martin Roberts and; Carlos Ruano in Madrid; Writing by Fiona Ortiz; Editing by Ralph Gowling)