Awaiting words from victorious party leader and future prime minister Mariano Rajoy, thousands of jubilant, cheering supporters waving red-and-yellow Spanish flags and blue-and-white party ones gathered outside Popular Party headquarters in downtown Madrid as pop music boomed over loudspeakers.

With 90 percent of the votes from the election counted, the center-right Popular Party won 186 seats compared to 154 in the last legislature, while the Socialists plummeted from 169 to 110, their worst performance ever.

The PP thus won an absolute majority and resounding mandate from troubled electorate. It needed 176 votes for such a majority.

One supporter, David Cordero, said he was happy with the prospect of change so as to create jobs and protect social services like state-paid health care and education.

"This is what this country needs right now," he said.

The conservatives won roughly 44 percent of the votes and the Socialists took 29 percent, according to official election results.

The numbers suggest Spanish voters have shifted clearly to the right as they confront their worst economic crisis in decades and choose new leaders to pull them out of it.

As part of that mess, the country is also at the forefront of Europe's sovereign debt crisis, with the Spanish government's borrowing costs rising last week to levels near where other eurozone countries such as Greece, Ireland and Portugal had to request huge bailouts from the European Union and the International Monetary Fund.

Besides the recent changes in which Greece and Italy replaced their governments with teams made up of technocrats, Ireland and Portugal—which also required huge bailouts to avert default—also saw their governments change hands.