HIALEAH (CBSMiami) – Carlos Hernandez was officially sworn in as Mayor of the City of Hialeah Friday afternoon.

His swearing-in ceremony took place at noon at Hialeah City Hall, three days after defeating former Mayor Raul Martinez in a runoff election.

READ MORE: Fort Lauderdale Man Accused Of Sexually Assaulting Teen Girl

It was a surprising upset for Martinez, who had never lost an election in Hialeah, even after he was convicted in the 1990s of extorting almost $1 million from developers.

READ MORE: Housing Crisis: County Mayors To Hold Roundtable On Skyrocketing Rents

The conviction was overturned and two subsequent trials ended in hung juries. Prosecutors eventually dropped the case.

MORE NEWS: 'Ride Of Silence' To Raise Awareness For Cyclists Safety On The Road

Hernandez replaced former Mayor Julio Robaina six months ago after Robaina resigned to run, unsuccessfully, for Miami-Dade County mayor.