BRASILIA (Reuters) - Centrist and center-right parties won city halls and consolidated control of town councils across Brazil in Sunday's municipal elections, underscoring a conservative shift in the country's electorate as the ruling Workers Party lost ground.
A photo finish in the race for mayor of Sao Paulo, Latin America's biggest city, set up incumbent conservative Ricardo Nunes to face leftist Guilherme Boulos in an Oct. 27 run-off, narrowly beating out far-right digital influencer Pablo Marçal.
Candidates associated with former hard-right President Jair Bolsonaro fared better than those backed by leftist President Luiz Inacio Lula da Silva. Bolsonaro's Liberal Party won in two state capitals and went to runoff elections in nine cities.
But it was parties of the Brazilian "Centrao" - a cluster of center and center-right parties associated with dealmaking politicians such as House Speaker Arthur Lira - that won the most mayoral seats.
Incumbent mayors won in half of the state capitals in Sunday's first-round vote, which helped more conservative parties entrenched by corruption scandals and economic struggles that have reshaped Brazilian politics over the past decade.
In the heated Sao Paulo race, where one candidate attacked another with a chair in a televised debate, the surge in votes for outsider Marçal showed an anti-establishment sentiment remains strong among Brazilian voters, which could be a deciding factor in the 2026 presidential race.
Lula, whose popularity has slipped in his third non-consecutive term, is expected to run for re-election. Bolsonaro was banned from running for elected office until 2030 for his baseless attacks on Brazil's voting system when president.
While local elections set the landscape for congressional and presidential races every four years, campaigns for Sunday's vote were largely focused on local issues and personalities.
Regional leaders who gained political capital included Para Governor Helder Barbalho, House Speaker Lira in his home state of Alagoas, ACM Neto in Bahia state and Sao Paulo Governor Tarcisio de Freitas - whose candidates for mayor won on Sunday.
Freitas, who is widely seen as the standard bearer of the Brazilian right most likely to succeed Bolsonaro, has emerged as a potential presidential contender, although he is expected to seek re-election as governor in 2026.
(Reporting by Anthony Boadle; Editing by Brad Haynes, Kirsten Donovan)