Spanish Prime Minister and Spanish Socialist Party (PSOE) candidate for prime minister Pedro Sanchez casts his ballot next to his wife Begona Gomez at a polling station in Madrid during general elections in Spain on April 28, 2019. - Spain returned to the polls for unpredictable snap elections marked by the resurgence of the far-right after more than four decades on the outer margins of politics. (Photo by JAVIER SORIANO / AFP)        (Photo credit should read JAVIER SORIANO/AFP/Getty Images)
JAVIER SORIANO/AFP/Getty Images
Spanish Prime Minister and Spanish Socialist Party (PSOE) candidate for prime minister Pedro Sanchez casts his ballot next to his wife Begona Gomez at a polling station in Madrid during general elections in Spain on April 28, 2019. - Spain returned to the polls for unpredictable snap elections marked by the resurgence of the far-right after more than four decades on the outer margins of politics. (Photo by JAVIER SORIANO / AFP) (Photo credit should read JAVIER SORIANO/AFP/Getty Images)
Now playing
03:20
Spain's socialist party wins general election
Anthony Blinken BBC intv
BBC
Anthony Blinken BBC intv
Now playing
03:27
Blinken: US will respond if Russia acts recklessly against Ukraine
Now playing
02:50
Brazil says it's ready to end deforestation in Amazon. But there's a price tag
The trial of the two US citizens charged with the murder of Italian police officer Mario Cerciello in July 2019 has concluded and a verdict is expected.
AFP
The trial of the two US citizens charged with the murder of Italian police officer Mario Cerciello in July 2019 has concluded and a verdict is expected.
Now playing
02:49
Italy charged two Californians with murder. Here are the case details
screengrab myanmar training
Reuters
screengrab myanmar training
Now playing
02:30
In Myanmar's jungles, protesters are training to fight the junta
Reuters
Now playing
01:50
Controversy around Ethiopia's Nile River dam project explained
Mexico C5 security system
Now playing
01:56
Video shows moment Mexico City metro overpass collapses
south africa cash in transit heist attempt pretoria McKenzie DNT intl ldn vpx_00004113.png
CIT Dashcam Video
south africa cash in transit heist attempt pretoria McKenzie DNT intl ldn vpx_00004113.png
Now playing
01:29
Gunmen with AK-47s ambushed cash-in-transit van. See how security team reacted
CNN
Now playing
04:59
Rare access to Ukrainian patrol boat challenging Russian navy
uruguay peoples pots feed hungry coronavirus pandemic romo pkg vpx_00000109.png
uruguay peoples pots feed hungry coronavirus pandemic romo pkg vpx_00000109.png
Now playing
02:24
This group of volunteers is on a noble mission amid pandemic
Now playing
01:21
Watch octopuses change color while they sleep
CNN
Now playing
05:00
Striking oil here could be worth billions of dollars. Not everyone is happy
screengrab myanmar journalist
DVB
screengrab myanmar journalist
Now playing
03:13
Myanmar's journalists face 'humanitarian crisis' as crackdown intensifies
Reuters
Now playing
04:19
Social media footage shows crush in Israel
screengrab myanmar thailand border
Karen National Union
screengrab myanmar thailand border
Now playing
03:06
Rare footage shows gun battle at Myanmar-Thailand border
Now playing
01:04
See Beijing launch key component of planned space station
(CNN) —  

Spain’s center-left Socialist Workers’ Party (PSOE) won Sunday’s general election, while a far-right party will enter the country’s parliament for the first time since dictator General Franco’s rule ended in 1975.

The far-right Vox party – which takes a hardline on immigration and gender rights – won 24 out of a total 350 seats, after bursting onto Spain’s political scene last year.

In an election with 75.8% turnout, the governing PSOE took 123 seats, and will now seek the support of other parties to form a government, having fallen short of an overall majority.

Spanish politics is fragmenting further, as PSOE’s traditional rivals, the conservative People’s Party (PP) won 66 seats, down from 137 in 2016’s election.

For years Spain was governed by the PP or PSOE, but Podemos, Ciudadanos and Vox have emerged in recent years, shaking up the two-party established order.

A total of 176 seats is required to control parliament, and neither the leftist nor the right-leaning bloc won the required amount. Center-right Ciudadanos won 57 seats while left-wing Unidas Podemos won 35.

With more than 98% of the vote counted the PSOE was declared winner by Spanish government spokeswoman Isabel Celaá Diéguez.

Incumbent PSOE Prime Minister Pedro Sanchez addressed supporters outside the party headquarters in Madrid after the result was confirmed.

“After 11 years a socialist party has won the general election in Spain. And so the future beats the past,” he said as the PSOE gained 38 seats more than in 2016.

“We have sent a message to Europe and to the world, that we can win over authoritarianism.”

A nun votes in Barcelona on Sunday during the third Spanish general election in four years.
Emilio Morenatti/AP
A nun votes in Barcelona on Sunday during the third Spanish general election in four years.

Sanchez to negotiate a deal

Spain is the only country in western Europe that has never been governed by a coalition government, though recent years have seen minority governments shored up by parliamentary alliances.

A new government could include the Basque Nationalist Party, known as PNV, or the Catalan separatists that forced the elections in the first place after refusing to support Sanchez’s 2019 budget in February.

Analyst Jose Torreblanca of the European Council on Foreign Relations told CNN the PSOE and Ciudadanos are the winners of the election, while the PP suffered a “complete defeat” as a “divided right wing committed suicide.”

Albert Rivera, leader of Ciudadanos, said “the bad news today is that Sanchez will govern with Podemos and the separatists … but there is a project with a future in Ciudadanos.”

Rivera promised his followers that the party will govern soon.

“Ciudadanos has risen as the hope and the future of Spain,” he added, after the party won 25 more seats than in 2016.

PP leader Pablo Casado congratulated Sanchez for his victory and said he hoped his rival “would be able to govern without the support of the Catalan separatists.”

Sanchez could agree a deal with Podemos or Ciudadanos, according to Torreblanca.

Pablo Iglesias, leader of Unidas Podemos, said the result is enough to fulfill the party’s objective of stopping the right and forming a left-wing government.

He urged Sanchez to “not succumb to the orange temptation,” a reference to a potential pact with Ciudadanos.

Shouts from the crowd interrupted Sanchez’s victory speech several times as supporters implored him not to form a coalition with the center-right party.

Far-right Vox weaker than predicted

While Vox won fewer seats than some had predicted, it is the first time that a far-right party has had such electoral success in Spain since 1982.

“We are going to have to fight harder. This is only the beginning,” said party leader Santiago Abascal at an event at Vox headquarters in Madrid. “We told you were starting a reconquest and that is what we have done. We are here to stay.”

Voter turnout was the third-highest in the history of Spanish democracy after the 1996 elections (77.38%) and the 1993 elections (76.4%), according to official figures.

Turnout was high despite this being the third election in four years as Spain battles mounting political instability.

As in several other European countries, the far-right has gained in popularity while traditional politics is fragmenting. Spain also has had to grapple with domestic issues such as the Catalan independence movement.