Spain's conservative People's Party (PP) has won Sunday's general election, ending eight years of Pedro Sánchez's Socialist government, with the far-right Vox party set to enter national government for the first time since the return of democracy more than 50 years ago.

With nearly all votes counted, the PP won 132 seats in the 350-seat Congress of Deputies, ahead of Mr. Sánchez's Socialists on 116. Vox was the night's big winner, jumping from 33 seats in 2023 to 52, and together with the PP and its Navarrese ally UPN, the right commands 186 seats — comfortably above the 176 needed for an absolute majority. Mr. Sánchez conceded defeat on Sunday night, calling his rival Alberto Núñez Feijóo to congratulate him and telling supporters at Socialist Party headquarters that it was a "sad night" for the country.

A record turnout and a sharp turn right

Turnout reached 79.52 per cent, virtually equalling the modern record of 79.97 per cent set in 1982, as voters who had stayed home in 2023 turned out in large numbers. About two hours after polls closed, the PP claimed victory on X, declaring that Mr. Feijóo, 65, would be Spain's next prime minister.

Mr. Feijóo, a former long-serving leader of Galicia, celebrated at party headquarters in Madrid and singled out Vox leader Santiago Abascal for praise, thanking "in a very special manner the candidate who saw the biggest rise in the number of seats". Mr. Abascal, addressing jubilant supporters, declared "Mission complete!" The two parties must still agree terms when the new parliament meets next month to vote a government into power, but a coalition is widely expected.

Why Sánchez lost

The result reflected voter anger over the rising cost of living and a housing crisis, two deadly rail disasters, and corruption scandals that dogged Mr. Sánchez's final years in office. The Socialists lost six seats from their 2023 tally, and the PP also slipped slightly, but Vox's 19-seat gain transformed the arithmetic of the chamber. The collapse of Mr. Sánchez's smaller coalition partners removed any path for him to stay in office.

Mr. Sánchez, who has governed since 2018, was one of Europe's few remaining progressive leaders and had defied US President Donald Trump on issues from Palestinian statehood to green energy and immigration. His departure ends the EU's last heavyweight centre-left government, and the result is being watched closely across Europe ahead of an election-packed 2027, with voters heading to the polls in France, Italy, Greece and Poland.

Mr. Sánchez, 54, said it was a democratic duty to recognise and accept the result "without suspicion, caveats and conspiracy theories". He is likely to face immediate pressure from within his party over his future as leader. For Mr. Feijóo, who failed to form a government after winning the 2023 election, the task now is to turn an electoral victory into a governing coalition — with Vox, for the first time, at the cabinet table.