RIO DE JANEIRO — He is a wealthy entrepreneur who became famous as the star of the TV show "The Apprentice," dismissing contestants with the phrase "You're fired."

But recently he turned his energies to the campaign trail with the catchphrase "I'm not a politician, I'm a businessman."

No, it's not Donald Trump. It's João Doria, and he's just been voted mayor of Sao Paulo, South America's biggest city.

Like Trump, Doria has written a series of self-help business books and enjoys luxury. He runs a management and communications group that publishes a magazine called Caviar Lifestyle. He starred in the Brazilian version of the show that made Trump a TV star.

Doria's victory in Sunday's local elections was a sign of how Brazilians are recoiling from traditional politicians. Doria defeated Fernando Haddad, an earnest academic and former education minister from the Workers' Party, which had governed Brazil for 13 years until this year, when President Dilma Rousseff was impeached on charges of breaking budget laws.

The Workers’ Party was the big loser nationally in Sunday's vote. It won just 256 city halls, less than half of what it got in the last local elections in 2012.

During the campaign, Doria blamed the Workers’ Party for Brazil’s worst recession in decades, and criticized the party and its allies for being caught up in a huge corruption scandal involving billions of dollars in bribes and kickbacks at state-run oil company Petrobras.

“There is no way not to be critical of the Workers’ Party,” Doria told the Folha de S.Paulo newspaper in August, blasting it for the “destruction of Brazil.”

Sao Paulo represented an especially important defeat for the party. Its most iconic figure — former president Luiz Inácio Lula da Silva, known as Lula – built his career on the city’s industrial outskirts, where he worked as a union leader.

Doria presented himself as a self-made man who started work at 13 — though he is from a patrician background. His brother Raul told Piauí magazine that the family struggled financially because their mother's relatives did not accept her marriage to a politician exiled during Brazil's military dictatorship, which lasted from 1964 to 1985.

Doria previously served as Sao Paulo’s tourism secretary and president of Brazil’s government-run tourism agency. He was a candidate for the center-right Brazilian Social Democratic Party, one of the biggest in Brazil. His focus was on his management skills.

“The fact that he’s new in politics, with a clean record, called my attention,” said Ana Paula Bispo, 25, a self-employed beauty technician from a favela, or low-income community, in the city. She said she voted for Doria because she was tired of seeing politicians dragged into corruption scandals.

The election was notable for the number of votes cast for unconventional politicians, as well as for the number of abstentions and votes in favor of no one.

“There is a very big fragmentation,” said Ricardo Ismael, a political scientist at the Pontifical University of Rio de Janeiro. “There are no winners. The political forces are more divided in the country.”

In Rio de Janeiro, the Workers’ Party’s preferred candidate barely figured in the results. Instead, the left-wing vote went to an outsider from a much smaller socialist party who will now face off against an evangelical bishop in a runoff election.

Marcelo Crivella, the bishop, who served as minister of fishing under Rousseff, led a crowded field with 28 percent of the vote, while Marcelo Freixo of the Socialism and Liberty Party got 18 percent. Crivella belongs to an increasingly powerful generation of conservative evangelical politicians in this majority-Catholic country.

“This shows the new strength of evangelical churches,” said José Álvaro Moisés, a professor of political science at the University of Sao Paulo.

In Rio, outgoing Mayor Eduardo Paes had chosen Pedro Paulo as the candidate to succeed him, but he failed to make the runoff vote. Both are from the centrist party of President Michel Temer, who took over after Rousseff's impeachment but has proved just as unpopular.

Over 17 percent of eligible voters nationwide did not turn up to vote — even though voting is mandatory in Brazil, and those who don't cast ballots can be fined. Large numbers of people cast blank or null ballots, according to results from major cities and state capitals. Analysts saw this as a sign of the increasing political vacuum here as people turn against traditional politics in the wake of successive corruption scandals.

In Sao Paulo and Rio, more people voted for nobody or abstained than opted for the leading candidates.

“The Brazilian population is highly politicized but it does not trust politicians,” said Paulo Baiá, a political scientist and sociologist at Rio’s Federal University. "Doria's line is that he is not a politician, he is from the world of work."