A far-right party won seats in a Spanish regional parliament for the first time since the country returned to democracy following the death of longtime dictator Francisco Franco in 1975, results in Andalusia's election showed.
With more than 99 percent of the votes counted late Sunday, the small Vox party took 12 seats in the 109-member regional parliament, handing a majority to right-wing parties in the southern Spanish region governed by the Socialists for more than three decades.
Vox had not previously held any seats in any legislative body in Spain since its founding four years ago, and now it has the key to forming a government in Spain's most populated region.
The result means that Vox, which opposes illegal immigration, Catalan independence and abortion, has exceeded even the most optimistic poll predictions which had forecast a possible five seat win.
"The Andalusians have made history... and got rid of 36 years of socialist rule," said Vox leader Santiago Abascal.
"Now is the moment to say loud and clear who we are and that we have come to stay," Vox candidate told a crowd of supporters who chanted "Spain! Spain! Spain!"
The Socialist Workers' Party (PSOE) scored the worst result in its history winning 33 seats, compared to 47 seats in 2015. That left the Socialists far from the majority of 55 seats needed to govern.
Its potential ally on the left Adelante Andalusia (Forward Andalusia) picked up only 17 seats, depriving the left of a majority, while the conservative Popular Party (PP) won 26 seats and the Ciudadanos liberals took 21 seats.
French far-right leader Marine Le Pen sent "warm congratulations" in a tweet to her "Vox friends".
The poll had been seen as the first of a series of tests for Socialist Prime Minister Pedro Sanchez.
It was Sanchez's first electoral test since taking office in June after winning a surprise vote of no-confidence in parliament against the previous PP government of Mariano Rajoy over a corruption scandal. There is speculation Sanchez may call early elections if he cannot pass a national budget this year instead of serving out the legislative term that runs until 2020.
His Socialists had ruled Andalusia since 1982. The party could lose control of the government in Andalusia if parties on the right join forces to oust regional leader Susana Diaz, though that would require that they join forces with Vox.
"Despite winning the election it is a sad night for the Socialist Party," Diaz said. "There has been a real loss of ground for the Left. But the worst thing is that the extreme right, a phenomenon that has appeared in the rest of Europe, has arrived here."
Diaz said she would call on other parties to "build a firewall against the extreme right in Spain."
However, Ciudadanos candidate Juan Marin ruled out any coalition with the Socialists, saying he would present himself as the candidate to lead the region.
The vote, however, is a mere foretaste of the coming 'super election year': 2019 will see municipal, regional and European elections and perhaps even an early general election to coincide with the other May polls.
All eyes will now be on Vox which can try to use Andalusia as a springboard in next year's elections.
If it did win a seat in the next general election, it would be the first time a far-right party had had a presence in Spain's lower house of parliament since 1982.
In all, 6.5 million were eligible to vote in the ballot in Andalusia, the country's most populous region and among its poorest.
The PSOE's Diaz -- who last year unsuccessfully challenged Sanchez for the party leadership -- had been seeking to retain the regional presidency while also giving Sanchez and the national party a fillip.
But Vox sought to throw a spoke in their wheels by adding its voice to traditional conservative forces led by the PP and market-friendly Ciudadanos, which has in recent years challenged the PP for the mantle of Spain's dominant liberal force.
"These elections are key as a first step in the removal of Pedro Sanchez" and the PSOE from the government, PP leader Pablo Casado told Radio COPE on Friday.
Casado said a defeat in its traditional southern fiefdom would render the PSOE's attempt to retain power nationally "unsustainable." The Socialists are already walking a tightrope given they hold just 84 seats in the 350-seat national assembly.
Both the PP and Ciudadanos had said during the campaign that if rightwing forces together won a majority of seats they would not rule out accepting support in the regional chamber from Vox.
Vox's campaigning had mainly been against illegal immigration and any decentralization of powers from Madrid.
Pablo Iglesias, leader of the far-left Podemos party, called on all leftist groups to mobilize "to defend liberties, social justice, fraternity and ultimately democracy."
Two members of Vox shouted insults at Diaz when she submitted her ballot early Sunday in Seville. Vox said both people had been removed from their positions as voting monitors due to "inappropriate behavior."