POLITICAL analysts in Brazil tend to insist that municipal elections have few implications for national politics. But political leaders do not seem to believe them. Dilma Rousseff, the popular president, campaigned for the governing Workers" Party's (PT) candidates in São Paulo and Belo Horizonte. And when the Socialist Party's (PSB) candidate was re-elected on October 7th in Belo Horizonte, the capital of Minas Gerais, Aécio Neves - a former state governor and the opposition's likely presidential candidate in 2014 - stood beaming beside the victor. So what conclusions can be drawn from first-round elections in which 116m Brazilians turned out to vote for 5,568 mayors? Such is the fragmentation of the political system that six different parties each won over 400 mayoralties, and 20 others elected at least one mayor. Both the governing coalition and the opposition could claim some satisfaction. The PT feared voters would punish it because the election coincided with the climax of a long trial, in which several of its former leaders are accused of using public money to buy votes in Congress during the presidency of Luiz Inácio Lula da Silva, Ms Rousseff's predecessor. This week the supreme court voted to convict José Dirceu, Lula's chief of staff, as well as two other senior former PT men. Many Brazilians see the trial as a milestone in the strengthening of democratic institutions - especially if the court jails Mr Dirceu. Nevertheless, the PT gained an extra 71 mayors. It may add more in run-offs in some big cities on October 28th. These include São Paulo, where Lula's campaigning has helped Fernando Haddad, the PT's candidate. The Party of Brazilian Social Democracy, the main opposition to Ms Rousseff, could also draw consolation from the vote. They lost almost 15% of their mayors, but won six of the bigger cities. José Serra, their former presidential candidate, will face Mr Haddad in São Paulo. Perhaps the happiest man on October 7th was Eduardo Campos, governor of the state of Pernambuco and the PSB's president. His party increased its mayors by over a third. Although the PSB is part of Ms Rousseff's coalition in Brasília, Mr Campos's candidates in Recife and Belo Horizonte defeated the PT. He is now talked of as a possible running-mate for (and successor to) Ms Rousseff in 2014, or an opposition candidate in 2018 - a politically profitable ambiguity. Brazilians tend to re-elect good mayors and punish bad ones. "The culture of good municipal management is here to stay," says Luiz Felipe d'Avila of the Centre for Public Leadership, a think-tank. But exceptions remain: in the backward state of Alagoas 25 mayoral candidates face court cases. Whatever happens to Mr Dirceu, wider cleaning is still needed.