dd7883cd-411d-41e8-8e0f-581192494129_original.mp4 video player.

LONDON - Spain's ruling Socialist party has won Sunday's general election with around 29% of the vote. Prime Minister Pedro Sánchez is set to begin coalition talks to try to form a government.

"The future has won, and the past has lost," Sánchez told cheering supporters Monday.

Following a deeply divisive election campaign, a far-right party will hold seats in the Spanish parliament for the first time since the regime of fascist dictator Francisco Franco ended in the mid-1970s.

People's Party (PP) candidate Pablo Casado reacts
People's Party (PP) candidate Pablo Casado reacts after the counting of the votes in Spain's general election in Madrid, Spain, April 28, 2019.

Meanwhile the center-right People's Party, which held power until June last year, saw its vote share collapse amid a splintering of the right-wing vote.

The pro-European Socialists will see a big increase in their number of lawmakers, but still short of a majority, so they will need to form a coalition either with the left-wing Podemos or regional parties.

Luis Cornago is Political Risk Analyst at Teneo Intelligence in London.

"That's going to take time because we have regional elections, local elections, and European elections coming in late May," he said. "So it seems that parties are going to hide their cards in terms of coalitions and all that and what they are doing next, until after that date."

Spain's acting Prime Minister Pedro Sanchez arrive
Spain's acting Prime Minister Pedro Sanchez arrives at a party meeting a day after Spain's general election, at PSOE headquarters in Madrid, Spain, April 29, 2019.

Prime Minister Sánchez had called the snap election after Catalan separatist parties in his ruling coalition refused to support the budget. His new government could once more rely on their support, said Cornago.

"They are going [to] claim something in exchange.They are going to say that they want a [independence] referendum," he added.

The issue of Catalan independence has echoed far beyond the northern Spanish region. The far-right Vox party gained around 10% of the vote and 24 seats in parliament, campaigning under the borrowed slogan "Make Spain great again." Many observers had expected the party to gain more votes.

Vox Leader Santiago Abascal told supporters Sunday his party is here to stay.

Santiago Abascal, leader of far right party Vox, g
Santiago Abascal, leader of far right party Vox, gestures supporters gathered outside the party headquarters following the general election in Madrid, April 28, 2019.

"This is just the beginning," he said. "We told you we were initiating a reconquest and that is exactly what we have done."

The Vox party's rise mirrors right-wing populists elsewhere in Europebut it has different roots, says analyst Luis Cornago.

"They go against immigrants and all these things that we see in other places — but in different places the flavors of radicalism are different," he said. "So in the case of Spain, without a doubt, the reason why they emerged and when they emerged, it's very much related to the Catalan issue and to some sort of Spanish nationalist response."

That issue is yet to be resolved, as many Catalonians continue to fight for independence.

Once formed, Spain's new government faces the daunting task of trying to reconcile an increasingly polarized and fractured country.