RIO DE JANEIRO (Reuters) - An evangelical bishop was elected mayor of Rio de Janeiro on Sunday in a second round of municipal voting that cemented a rout of the leftist party and allies who dominated Brazil’s presidency and major cities for over a decade.

Senator Marcelo Crivella, candidate for Rio de Janeiro mayor, gestures to photographers after voting during the municipal elections at a polling station in Rio de Janeiro, Brazil, October 30, 2016. REUTERS/Ricardo Moraes

Marcelo Crivella, a controversial conservative who is a senator, bishop and nephew of the founder of an evangelical megachurch, defeated a progressive former schoolteacher to run Brazil’s second biggest city by a margin of nearly 20 percentage points.

The 59-year-old pastor weathered an uproar over past criticism of homosexuality and Catholicism, the dominant religion in Latin America’s largest country, by distancing himself from those comments and vowing to govern for Rio’s residents, not the Universal Church of the Kingdom of God, the influential congregation from which he hails.

In a victory speech to supporters in a working-class Rio neighborhood, he promised to “take care of people,” echoing campaign vows to improve deficient public services, from health to transport to sanitation, that complicate day-to-day life for the blue-collar voters who supported his candidacy.

Crivella’s victory, partly fueled by the growing influence of evangelical voters, fortifies a rightward shift in Brazil following the 13-year reign of the leftist Workers Party, which presided over a long economic boom before cratering during the recession and an historic corruption scandal.

But the elections, which toppled many incumbents in a first round of voting earlier this month, are also a broader renunciation of the status quo, with voters frustrated by a second year of recession and the giant kickback scandal that has led to the arrest dozens of political and corporate chieftains.

“It’s an important election to change the old way of doing things,” said Rafael Mello, a civil servant who voted Sunday morning in Rio.

Slideshow ( 6 images )

In the first round of voting, just weeks after lawmakers impeached former President Dilma Rousseff because of budget irregularities by her Workers Party government, two-term Rio Mayor Eduardo Paes, a one-time Rousseff ally, failed to secure a place in the runoff for his hand-picked successor candidate.

In São Paulo, Brazil’s biggest city and the cradle of the Workers Party, voters ousted Mayor Fernando Haddad, once considered one of the party’s rising stars. The Workers Party held onto only one of the state capitals it had previously occupied.

EYEING 2018 PRESIDENTIAL ELECTION

Sunday’s voting will also influence how some key players at the national level could fare ahead of the 2018 presidential elections.

In Belo Horizonte, capital of the rich southeastern state of Minas Gerais, a loss by a candidate from the centrist Brazilian Social Democratic Party is expected to help resolve an ongoing power struggle within the PSDB, as the party is known.

The PSDB, which had been the chief opposition to the Workers Party and is increasingly well positioned to retake the presidency after four consecutive defeats, won São Paulo and other important cities in the first round of municipal elections.

The victory by wealthy businessman João Doria in São Paulo fortified Geraldo Alckmin, the governor of that state and a possible presidential candidate, who pushed for Doria despite opposition from other PSDB leaders.

The loss in Belo Horizonte, to a smaller centrist party, is considered a defeat for Aecio Neves, another PSDB leader who was the party’s candidate against Rousseff in 2014. Neves, a senator and former governor of Minas Gerais, failed to win the state in that election and gave his imprimatur to this year’s losing mayoral candidate.

Crivella, the Rio victor, belongs to the Brazilian Republican Party, a relatively new conservative party.

His leftist rival, Marcelo Freixo, represented the Socialism and Liberty Party, which broke away from the Workers Party over a decade ago to focus on human rights, education and social issues.

Though Freixo garnered energetic support from celebrities, artists, intellectuals and prosperous Rio leftists, their ballots were easily outnumbered by a populist vote in less affluent parts of the city, traditionally skeptical of progressive platforms.