Brazil's governing Workers Party took back the mayor's office here with a runoff victory by electoral newcomer Fernando Haddad.
Sao Paulo, Brazil's largest city and business capital, has been run by the opposition since 2005.
Haddad, 49, topped former mayor and two-time presidential candidate Jose Serra by 55.6 percent to 44.4 percent in Sunday's second round of voting.
The outcome represents a triumph for the Workers Party, or PT, and for former President Luiz Inacio Lula da Silva, who handpicked Haddad - his erstwhile education minister - to represent the party in Sao Paulo.
Starting off at 2 percent in the polls, Haddad needed a late surge to even qualify for the runoff.
In his first speech as mayor-elect, Haddad thanked Lula, current President Dilma Rousseff and the PT organization for their efforts on his behalf.
The PT triumph should not be seen as a surprise, political analyst Luciano Dias said, given that the center-left party can generally count on the support of roughly 30 percent of the Sao Paulo electorate.
"Haddad's problem was that he took a long time to mobilize those PT votes," Dias told Efe.
The result in Sao Paulo appears to mark the political sunset of the 70-year-old Serra, who has been mayor of the city and governor of the likenamed state and a federal senator, but fell short of his ambition to be president of Latin America's economic giant.
Serra lost to Lula in 2002 and to Rousseff in the 2010 presidential contest. EFE