Spain s Prime Minister Pedro Sanchez takes part in the closing rally of Socialist Party (PSOE) s electoral campaign in Barcelona on May 26, 2023, ahead of the May 28 regional and municipal elections. AFP
What is at stake?
Some 35.5 million people are eligible to vote in 8,131 municipalities across the country to elect more than 67,000 councillors.
Voters will also elect leaders in 12 of Spain's 17 regions, of which 10 are governed by Prime Minister Pedro Sanchez's Socialists either alone or in coalition.
The right-wing opposition Popular Party (PP) controls the other two.
Ballot boxes open at 9:00 am (0700 GMT) and close at 8:00 pm.
Why the elections matter
Spain is due to hold a general election by the year's end and Sunday's polls will give a sense of the electoral mood.
Polls suggest the PP will win the general election but fall short of an absolute majority in parliament.
Sanchez currently governs in a minority coalition with the hard-left Podemos.
The election also matters in highly decentralised Spain because the regions enjoy wide powers, notably over education and healthcare.
Balance of power
The outcome of the municipal elections will provide a much-awaited first indication of the balance of power between the Socialists and the PP.
Four years ago, the Socialists won 1.6 million more votes than its rival, but this year, the PP is confident of taking the lead.
At a regional level, the right is hoping to win power in areas currently run by the Socialists but it remains unclear how many. Taking three or four regions would be considered a success for PP leader Alberto Nunez Feijoo, who took the party's helm last year.
The battles to follow
In Madrid, there is no doubt the PP's hardline and deeply ambitious Isabel Diaz Ayuso will be re-elected head of the regional government but it is not clear whether she'll get an absolute majority to allow her to rule without the support of Vox.
In Valencia, Spain's fourth-largest region, the PP is hoping to pull off a double win, ousting the Socialists both at a regional level and from the city hall. If they are successful, it would be a major blow for Sanchez.
In Barcelona, the polls give the Socialists a good chance of taking city hall which they ran from 1979 to 2011, and which is currently in the hands of a hard-left coalition.
Short link: