With more than 99 percent of the votes counted late Sunday, the small Vox party took 12 seats, handing a majority to right-wing parties in the southern Spanish region governed by the Socialists for more than three decades.
The result means that Vox, which opposes illegal immigration and Catalan independence, 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.
The Socialist Workers' Party (PSOE) scored the worst result in its history winning 33 seats.
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.
— EL PAÍS (@el_pais) December 2, 2018
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 afterwinning a surprise vote of no-confidence in parliament against the previous PP government of Mariano Rajoy over a corruption scandal.
Women place slices of “Chorizo” spicy pork sausages inside ballots to protest against corrupt politicians at a polling station in Ronda. Photo: AFP
His Socialists had ruled Andalusia since 1982.
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 Susana 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 decentralisation of powers from Madrid.
Pablo Iglesias, leader of the far-left Podemos party, called on all leftist groups to mobilise “to defend liberties, social justice, fraternity and ultimately democracy”.
Diaz meanwhile called for “stability” as she ended her campaign, warning voters against forces of the right and far-right that “want to take us backwards”.
By AFP's Álvaro Villalobos