next Image 1 of 2

prev Image 2 of 2

A regional election in Spain saw a surge of support for a far-right party and dealt a major setback for the ruling Socialists, whose prime minister said Monday that he will defend democracy from fear.

The anti-migrant, anti-feminist and euroskeptic Vox party won 12 seats Sunday in the 109-member parliament of Andalusia, Spain's most populated region and a bastion of the Socialists for the past 36 years.

The four-year-old Vox party, which had not previously held any seats in Spain, could now be a kingmaker and oust the Socialists from Andalusia's regional government if they strike a deal with conservatives and the center-right to assemble a 59-seat majority.

Those leaders on Monday began talks to form a regional government, which both parties said would include contacts with Vox.

The surprising win — the most favorable polls ahead of the election predicted Vox would win about five seats — also launched the party's strategy to make a dent in national politics and the European elections next year. It's also a blow to those who had felt that sour memories of Spain's 20th-century dictatorship and a consensus over the European Union's benefits had inoculated the country from a wave of rising populism in Europe.

French far-right leader Marine Le Pen was one of the first to celebrate Vox's success, congratulating the party's national leader Santiago Abascal in a tweet for what she said was "a very significant result for a young and dynamic movement."

In a sharp contrast, Spain's Socialist prime minister, Pedro Sanchez, tweeted Monday that "my government will continue working on a regenerating and pro-European project for Spain." He said the result will "strengthen our pledge to defend the Constitution and Democracy against fear."

The Socialists saw their support plummet to just 33 seats, compared to 47 in 2015 and far from the majority of 55 needed to govern even if they could get the backing of Adelante Andalucia, the local brand of the anti-establishment Podemos party, which took 17 seats.

The conservative Popular Party came second with 26 seats — down seven from previously — and the center-right Citizens party more than doubled its presence in the regional assembly, capturing 21 seats.

Still, analysts said that having Spain's right-wing side themselves with the far-right could backfire, especially with local, other regional and European elections next year and a possible general election that could come any time before 2020.

That's the limit of the legislative term for Sanchez, who toppled former conservative Prime Minister Mariano Rajoy in June with a no-confidence vote. Sanchez now leads Spain's weakest minority government in four decades of democracy and there is increasing speculation that he could be calling an early election.