By Steve Kingstone
BBC correspondent in Sao Paulo
Brazilian President Luis Inacio Lula da Silva has been fined nearly $18,000 for breaking the country's election law.
Lula fell foul of election law
The punishment relates to a speech he made at a publicly-funded event in Sao Paulo in which he urged voters to re-elect the city's mayor.
On Friday a regional court ruled that the comments had been an act of "electoral propaganda" because they were made at an official event.
He made the remarks three weeks ago at the official opening of a new road.
Addressing a crowd of 5,000 he said that if people wanted further progress in social policy they should re-elect Sao Paulo Marta Suplicy, who is member of Lula's Worker's Party.
Lula's transgression was not that he supported his colleague but the fact that he did so on a public stage at an event paid for with public money.
The president, who has the right to appeal, has already apologised saying he got carried away in the heat of the moment.
But electoral law is taken very seriously in Brazil where democracy was only restored 20 years ago.
What is not clear is whether Lula's remarks had any effect on last Sunday's first round of voting.
Nationwide his Worker's Party won more votes than any of its rivals, but in Sao Paulo itself the mayor was beaten into second place and faces a run-off election.