Vox’s results were celebrated by the party’s allies across Europe, with Giorgia Meloni, the Italian prime minister, calling the result “a good sign for all of Europe”.

Marine Le Pen, the hard-Right frontrunner for next year’s French presidential elections, said the election was a signal that a “patriotic wave is sweeping across Europe”.

“Every victory by our allies brings closer the moment when this project will command a majority at the very heart of the European institutions,” she said.

Jordan Bardella, the leader of Ms Le Pen’s Rassemblement National, said: “The Spanish people have spoken: they are putting an end to the rule of Pedro Sanchez, who was beset by corruption scandals and had turned his country into one of the gateways for immigration to the European continent.”

Meanwhile, Emmanuel Macron congratulated Mr Feijóo on the victory, saying he was ready to work with him “for a stronger and more sovereign Europe”.

“All of Europe is waiting for a political shift in Madrid,” Alice Weidel, the leader of Germany’s AfD party, said before the result had been announced.

After strained relations under Mr Sánchez, Gideon Sa’ar, the Israeli foreign minister, congratulated both PP and Vox, saying: “I believe that now, together, we will be able to restore Israel-Spain relations, which are so important to both countries.”