In September, Spain's caretaker Prime Minister Pedro Sanchez said that fresh elections will be held on 10 November after the announcement by King Felipe VI that he failed to find a party leader who can win a big enough majority in parliament to form a government.
The king made the decision after two days of talks with party leaders.
“I have tried by all possible means, but it has proved impossible,” Sánchez said at a news conference, explaining why five months of negotiations had ended in failure.
“Spain needs a government, but not any old government,” he said.
After Sanchez's news announcement, none of the other main party leaders indicated they are trying to avoid a return to the polls, making the election a near-certainty.
The main candidates in Spain's fourth national election in four years have already dismissed several possible scenarios for forming a government by agreement should the result be inconclusive. But all parties are well aware that voters do not want a fifth election, and they might have to strike a deal in the end.
Here are possible scenarios:
Minority Scocialist Government
The most likely scenario. Acting Prime Minister Pedro Sanchez's Socialists lead in opinion polls though most see them winning slightly fewer seats than in the previous election in in April, down from 123 out of 350 to about 120.
The question is who their allies could be. In the past, their natural partners would have been the far-left Unidas Podemos. But there is bad blood between them after failed talks following the April election. And their chances of having enough seats to govern together are slim.
Other options could include a pact which regional parties would join, but considering the tensions over Catalonia's independence drive, that would also be tricky.
The option gaining traction would be an unusual one - the conservative People's Party (PP) abstaining in parliament to let Sanchez be voted in as prime minister.
But their support would not come for free and would likely come at the last minute to avoid a repeat election. It would not guarantee the budget can be adopted or that the government would last.
And if the far-right Vox gets a strong result, PP could fear that backing the Socialists, even without entering government, could hit them hard in the next election.
The centre-right Ciudadanos, whom polls predict will collapse in this election, could also be tempted to support Sanchez to get back in the game.
The Socialists have said that if they win the election without a majority, they would make proposals to other parties within 48 hours and would aim to strike broad pacts on issues such as Spain's unity and regional financing.
Socialist-led Coalition Government
Much less likely but not impossible. The Socialists have made clear they want to govern alone. But they could eventually decide to change their mind if that is the only way to stay in government.
Less likely than a Socialist government but cannot be ruled out after they gained some steam after riots by separatists in Catalonia mobilised some right-wing voters.
About a third of voters are still undecided, opinion polls showed, meaning even unlikely scenarios still have a chance of happening.
No matter what happens, this will always be a possibility. Rival parties will all try to put the blame for a possible repeat election on each other, but the threat of this happening will also be the main reason behind efforts to strike a deal.
One Single Party Gets A Majority
Next to impossible. Opinion polls, political leaders and analysts all agree this will not happen. The Socialists are ahead but with less than a third of the votes.