(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.

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.