Let's first rewind two years: The 2010 presidential election in Brazil was unofficially framed as "Luiz Inacio Lula da Silva versus the opposition".
Lula of course was not on the ballot. He was term limited, but his hand-picked candidate, Dilma Rousseff, was seen as an extension of his eight-year term which he oversaw Brazil’s historic economic growth and where he left office as the most popular president of the modern era with high 70 percentage point approval ratings.
With the popular Lula finally out of the way, the main opposition party, the PSDB, had as their candidate the capable, battle-tested, Jose Serra, a heavyweight political fighter who had served as widely regarded health minister in a previous life, and more importantly as mayor of Sao Paulo and governor of Sao Paulo state, two of Brazil's most prized elected offices after the presidency.
Serra had also run for president previously, so he had played at the highest levels of Brazilian politics for decades.
Rousseff, as we all know, despite having never run for office before, won that election going away, 56 per cent to 43 per cent, to become Brazil's first female president.
The election signalled that Lula's political influence was still just as strong even without his name on the ballot.
Let's now fast-forward two years: 2012, and the Sao Paulo's mayor position is up for grabs with the incumbent not running.
Coveted political position
Being mayor of Sao Paulo - South America's largest city and the financial hub of country with the biggest economy in the region - is one of the most coveted political positions in Brazil for the major political parties.
The opposition PSDB party wanted the post badly, so they put up their heaviest hitter, the standard-bearer of the party, none other than Jose Serra.
He was an immediate favourite, the post was seen as his for the taking.
Sao Paulo is his home base and his political roots in the city and state run deeper than almost any other political figure.
The PSDB already controls the state governorship, and with the mayoral post of Sao Paulo, it was going to be seen as the party stranglehold in Brazil's most important state and city two years ahead of the all-important 2014 presidential election.
Further helping the PSDB cause, Lula had been out of political life for more than a year battling cancer, so his political influence was widely seen as waning.
But the ruling Workers Party had their own plan: Lula recovered from cancer, and as the all powerful figurehead of the party, he decided his return to the political stage would be with a guy named Fernando Haddad, his hand-picked candidate to run against Serra in the Sao Paulo mayor race.
Lula's political roots in Sao Paulo run deep as well, so it was just as personal to him as it was to Serra.
It was a risky move. Haddad is young, urban and progressive, but was also a fairly unknown figure who had never run for political office before, and his highest-profile position in government was being the noticeably low-profile minister of education when Lula was president.
Steep hill to climb
Haddad had a steep hill to climb. In June he was polling at eight per cent, and by late September was only polling at 15 per cent.
But he had Lula aggressively campaigning on his behalf, and that's what mattered the most and helped Haddad narrowly get into a second round runoff with Serra.
While all this happening, back in Brasilia, the supreme court was convicting several former Lula top aides of crimes dating back to a corruption scandal in 2005.
It was generating a barrage of local media coverage, and the opposition was salivating that it could mean the end to the Lula era of popularity once and for all.
Serra tied Haddad to the scandal [Haddad was not implicated in it], essentially framing the mayoral race as a Lula or Serra choice.
That might have been the fatal mistake. When faced with a choice in those terms, the decision was more clear: On Sunday, voters in Sao Paulo elected Haddad mayor of Sao Paulo, 55 per cent to 44 per cent, ironically almost the exact same percentage Serra lost the presidential race to Rousseff two years earlier.
Haddad's victory caused hundreds of supporters to pour into Avenida Paulista to celebrate on Sunday, but, more importantly, probably ended the long political career of Serra, threw the PSDB party into at least temporary disarray, and signalled that Lula still remains the 1,000lb elephant in the room that can trample any political opposition.
[Other so called "Lula candidates" lost runoffs elsewhere, and the opposition gained two key mayoral posts in the fast growing northeast of Brazil, including in Salvador, Brazil's third largest city, but Sao Paulo was where the battle of national significance was playing out, and where Lula fought the hardest for the win.]
Sao Paulo remains a divided city: The working-class neighbourhoods voted big for Haddad, like Cidade Tiradentes where Haddad won 80 per cent of the vote. Contrast that to residents of wealthy neighbourhoods, like Jardim Paulista, where Serra won 77 per cent of the vote.
Signalling an awareness of the social divide, on Sunday Haddad said he would try to break down the wall between rich and poor in Sao Paulo. [How he fixes Sao Paulo's traffic mess is another issue altogether.]
As for the PSDB, they are in major re-group mode. The party will likely start elevating the stature of Aecio Neves, the young and charismatic senator who has the clear inside track to be the party candidate for president in 2014.
They have two years to figure out a strategy for 2014, but it is a safe bet they won't frame it as a race against Lula, as that has proven in recent years to be a road that leads to a dead end.
The newspaper headlines on Monday in Sao Paulo's most influential newspapers will probably read something like this: 'Haddad wins."
They could just as easily read: "Lula wins ... again."
Follow Gabriel Elizondo on Twitter @elizondogabriel