Spain's centre-right opposition have stormed to an election victory as voters punished the outgoing Socialist government for the worst economic crisis in generations.
The People's Party, led by former Interior Minister Mariano Rajoy, won an absolute majority in parliament.
The party won the biggest majority for any party in three decades, taking 186 seats in the 350-seat lower house, according to official results with 98% of the vote counted.
The People's Party is expected to push through drastic measures to try to prevent Spain being sucked deeper into a debt storm threatening the whole eurozone.
Voters vented their rage on the Socialists, who led the country from boom to bust in seven years in charge. With five million people out of work - the European Union's highest jobless rate - Spain is heading into its second recession in four years.
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 eurozone's fight for survival.
Voters were angry with the Socialists for failing to act swiftly to prevent the slide in the eurozone'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.
Spaniards were the fifth European nation to throw out their leaders because of the spreading eurozone crisis, following Greece, Portugal, Ireland and Italy.