Polls have opened in Spain for a snap general election called eight months ahead of schedule by Prime Minister Pedro Sánchez.

Sánchez's Socialist party faces a strong challenge from the conservative People's Party (PP), which may require the support of the far-right Vox party to form a majority. Opinion polls indicate that Sánchez is narrowly trailing behind the PP's candidate, Alberto Núñez Feijóo, although Sánchez has expressed confidence in a possible victory.

The election campaign has been dominated by the issue of affordable housing, with the cost of living and immigration also being significant concerns. Sánchez, who has been in power since 2018, has gained international prominence for his stance on the conflict in Gaza and criticism of former US President Donald Trump.

Domestically, his government has faced challenges including corruption scandals and two fatal railway accidents. If Sánchez's party secures the most seats, forming a coalition on the left could prove difficult.

Millions of Spaniards are eligible to vote until 20:00 local time (19:00 GMT) on Sunday. Preliminary results are anticipated about an hour after polls close, with official results expected throughout Monday.