President Lula is enjoying support of 80%, opinion polls suggest
Brazil's local elections have brought mixed results for President Luiz Inacio Lula da Silva's Workers' Party.
Almost 130 million Brazilian voters went to the polls on Sunday to elect mayors and councillors.
The Workers' Party won mayoral votes in six out of 27 regional capitals but did worse than expected in Brazil's biggest city, Sao Paulo.
The elections are seen as an indicator of who may succeed President Lula when he steps down in 2010.
Brazilians voted amid heavy security, with more than 5,000 soldiers joining 27,000 police in Rio de Janeiro to ensure that militias and drug gangs did not influence the ballot.
In the capital, Brasilia, a man who tried to get into the presidential residence was shot and wounded in the leg after ignoring warnings from guards. Lula was not in the residence at the time.
Campaigning for the elections centred on crime, unemployment, health care and education.
The president's popularity is at an all-time high but his intervention could not produce a victory in Sao Paulo for his party's candidate, Marta Suplicy.
With no clear winner in the city, the vote will go to a second round on 26 October.
The Workers' Party (PT) will also contest run-offs in Rio De Janeiro and the south-eastern city of Belo Horizonte.
With Brazilians voting in 5,563 towns and cities, these elections had been expected to deliver big gains for the PT and its allies.
Brazil's constitution limits the president to two consecutive terms in office and the PT has yet to select a candidate for the presidential election in two years' time.
At the moment the likeliest choice would appear to be the powerful figure of Dilma Rousseff, the president's chief of staff, says the BBC's Gary Duffy in Sao Paulo.