
Spain was in uncertain territory Monday after the conservatives and far-right inflicted a decisive electoral defeat on Socialist Prime Minister Pedro Sanchez, who announced his resignation.
AFP looks at what comes next following Sunday's vote, which could lead to the first far-right participation in a national government since dictator Francisco Franco's death in 1975.
The main conservative Popular Party (PP) finished Sunday's vote with 132 seats, the most of any party, but fell well short of the 176 needed for a majority in the 350-member parliament.
Far-right, anti-immigration party Vox equalled its best-ever general election result, gaining 19 seats to reach 52. An alliance with the PP would achieve a majority with 184 MPs -- and is PP leader Alberto Nunez Feijoo's only path to power.
Feijoo has not ruled out working with Vox, unlike other European conservatives who have established a "cordon sanitaire" against the far right.
The PP and Vox already run several Spanish regional governments together, but potentially tricky negotiations lie ahead for the formation of a national administration.

Paloma Roman, a professor of political science at Madrid's Complutense University, predicted that Vox would enter government demanding responsibilities over immigration and "culture war" issues in a divided, polarised country.
"The difficulty will lie with the PP, in how to contain" Vox and "project an image of not being dependent on the ally", Roman told AFP.
Both parties will have to confront a chronic housing crisis, which sparked national protests that led to the snap election, as well as high inflation that has eroded citizens' purchasing power.
A failure to reach a deal could lead to more political instability, with a minority PP government or fresh elections among the possible outcomes.
Traditionally an economically liberal party, the PP advocates tax cuts, less red tape and plans to solve the housing crisis by building one million new homes.
Both the PP and Vox have vowed to repeal a 2022 "democratic memory" law that Sanchez introduced to recognise and compensate victims of the Franco dictatorship.

Vox calls for the deportation of irregular migrants as well as foreign citizens who commit crimes and those it deems are living off public benefits or do not respect Spanish customs.
The party also wants Spanish nationals to have preferential access to some public benefits, making the measure a precondition for its coalition with the PP in several regional governments.
The new parliament and Senate must be formed within 25 days, with the next legislature set to open on December 23.
The speaker of parliament visits King Felipe VI, who holds consultations with the parties. The precise dates for those talks are uncertain, with Spanish media pointing to late December or early January.
The monarch then proposes a new head of government, who has to pass an investiture vote in parliament to formally take office.
Renowned as the great survivor of Spanish politics, Sanchez ran out of lives on Sunday as the Socialists slumped to 116 seats.

Roman said the election result "was a personal defeat for Sanchez", whose domestic standing had been eroded by corruption scandals and years of shaky minority governments even as his international profile grew.
On Monday he announced he was stepping down both as his party's leader and as a member of parliament. He had been prime minister since 2018.
rbj/imm/st