Spain’s opposition conservative party has failed to get an overall majority in parliament, leaving the country facing a period of political deadlock.
The centre-right People’s Party and the far-right Vox won a combined 169 seats in parliament, while the Socialists and far-left Sumar won 153, well short of the 176 seats needed for a majority.
The result means neither Alberto Núñez Feijóo’s Popular Party (PP) nor Pedro Sánchez’s incumbent Socialist Party (PSOE) won a decisive majority.
After winning the most seats, the People’s Party will be given the first opportunity to cobble together enough votes in parliament to win a prime-ministerial vote.
However, its alliance with the far-right Vox will make it difficult to gain support from any other faction.
Mr Sánchez’s controversial decision to call the vote in the heat of a Spanish summer has left him with a slim chance to form the next government, but it could mean relying on Catalan separatist parties.
They could demand an independence referendum, triggering the kind of political chaos seen in 2017 when Catalonia last tried to break from Spain.
Mr Sánchez told supporters: “The reactionary bloc of regression, which set out a complete reversal of all the advances that we’ve achieved over the past four years, has failed.”
He could win over left-wing separatist party Esquerra Republicana de Catalunya (ERC), as he did to form a minority government in 2019.
However, he will likely also need the backing of the more hardline Junts, which has not supported Mr Sánchez in the past four years, and has made clear any support would be in return for an independence referendum.
Carles Puigdemont, one of the party’s top leaders, said Junts would back neither Sanchez nor Feijoo.
Mr Puigdemont is living in self-imposed exile in Belgium and is wanted by Spanish authorities for leading a failed independence bid in 2017.
Pre-election polls had predicted a bigger victory for the PP and the possibility for it to form a coalition with Vox.
PP and Vox have already teamed up to govern in dozens of regions and cities since local elections in May.
Vox, founded in 2013, has proposed the expulsion of illegal migrants and a naval blockade to stop them arriving, and the closure of mosques promoting “radical Islam or jihad”.