The People’s Party (PP) and Vox victory in Spain’s election marks the far right’s first entry into national government since the country’s transition to democracy in the late 1970s. It also reflects the rise of Vox, a far-right newcomer that has reshaped Spain’s political landscape over the past decade.

The result is a major moment in Spain’s political evolution and is likely to have consequences beyond the country. US President Donald Trump quickly celebrated outgoing Prime Minister Pedro Sanchez’s defeat, calling it “great news”. Sanchez had often clashed with Trump over NATO and Spain’s refusal to meet its defence expenditure commitments. Italy’s far-right Prime Minister Giorgia Meloni also congratulated her “friends”, Vox leader Santiago Abascal and PP leader Alberto Nunez Feijoo, who is likely to become Spain’s next prime minister.

The outcome is likely to be seen as another sign of the radical right’s electoral strength, despite recent setbacks in countries such as Hungary, Brazil and the US. In Europe, it could embolden far-right movements in France, Germany and the United Kingdom.

Vox and Abascal have drawn on campaigning and branding lessons from far-right parties across Europe. Abascal rejects the far-right label while openly embracing far-right positions. During the campaign, he linked migration to crime, described Muslim migration as an “invasion” and called for the “reimmigration” of “some” foreigners. Vox’s rise to national power is likely to strengthen reactionary elements of the European far right and normalise concepts such as “reimmigration”. After Viktor Orban’s defeat in Hungary, Vox is set to be one of a handful of parties in the Patriots for Europe grouping with representation at the national level.

The election was disappointing for the Spanish Socialist Workers’ Party (PSOE), but the party performed better than many expected. After eight years in government, it is set to lose only about five seats compared with the last election. Sanchez has also succeeded in removing any major challengers to his left.

The PSOE’s result is therefore not a collapse. It may offer some reassurance to socialists in Spain and across Europe: the progressive policies and positions taken by the Sanchez government during the last Parliament did not prove as costly at the ballot box as some had argued.

The result offers little evidence of a wholesale rejection of progressive positions, including the regularisation of hundreds of thousands of migrants and the condemnation of Israel’s actions in Gaza. Housing and the cost of living remained key voter concerns, while migration also clearly contributed to Vox’s advance. The PSOE may therefore have reason to remain confident about its short-term prospects.

The PP, meanwhile, will have to manage a difficult coalition with a partner that could pull it further to the right. Vox thrives in culture war politics, but that may not suit a more moderate conservative such as Feijoo.

Socialists risk becoming too comfortable with their narrow defeat and assuming the PP and Vox will fall out. In 1996, when the PP under Jose Maria Aznar first took power from the PSOE with a wafer-thin majority (just more than 1 percent of the vote), the PSOE concluded that voters had not rejected socialist policies as predicted and that radical change was unnecessary.

That “sweet defeat”, as Alfonso Guerra, the party’s deputy secretary-general at the time, famously described it, set the stage for a PP landslide four years later. The lesson for socialists is that a surprisingly narrow defeat can be reassuring, but should not distract them from political realignments.

The “leap to the right” some expect may not be difficult: the PP and Vox appear to be more natural partners than the PSOE and the broad collection of left-wing parties that supported different versions of the Sanchez government.

To survive and have a chance of winning the next election, the socialists will need to reflect on their performance and develop an ambitious agenda addressing the most pressing grievances of the Spanish people.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.