An evangelical bishop has been elected mayor of Rio de Janeiro, as rightwing candidates across Brazil strengthened their influence at the expense of a decimated Workers’ party.

Despite his past condemnation of Catholics and homosexuals, Marcelo Crivella of the Universal Church of the Kingdom of God won control of the city in a second round of municipal elections that underscored the rise of religious conservatism and the demise of the leftwing party that has dominated national politics for more than a decade.

Marcelo Crivella embraces his wife, Sylvia Jane, after his election victory. Photograph: Yasuyoshi Chiba/AFP/Getty Images

The Workers’ party lost every mayoral post it contested on Sunday, including two in São Paulo state, where it was founded, and Recife, which was long considered a stronghold. This followed heavy defeats elsewhere in the first round of local elections earlier this month.

It extends a horrendous period for the party, which was pushed out of power this year with the impeachment of former president Dilma Rousseff, and has subsequently seen its founder, Luiz Inácio Lula da Silva, ordered to stand trial on charges of corruption and obstruction of justice in the Lava Jato (Car Wash) investigation into bribery at the state-run oil firm Petrobras. Both deny wrongdoing.

Although almost all the major parties were involved in the scandal, Michael Mohallem, law professor at the Getúlio Vargas Foundation, said the Workers’ party (PT) was worst hit and would be severely weakened in the run-up to the 2018 presidential election.

“The PT suffered the most. It has regressed 20 years in terms of its number of votes. That is a direct impact of the Lava Jato operation,” he said.

Disgusted by the revelations of Lava Jato – which implicated dozens of politicians across the ideological spectrum in a massive kickback system – and tired of a lingering recession, voters nationwide showed their contempt for the entire political system. There was a record number of spoiled and blank ballots and many people failed to vote altogether despite a legal obligation to do so.

They also showed a willingness to choose candidates from outside the mainstream. In Belo Horizonte, the mayoral race was won by Alexandre Kalil, a former football club president from the little-known Humanist Solidarity party, who campaigned on a platform of not being a politician.

Alexandre Kalil, a former football club president, greets people on the campaign trail in Belo Horizonte. Photograph: Amira Hissa/AP

In Rio, the runoff was between candidates from two parties that were once considered on the fringe. Crivella, a conservative from the small Brazilian Republican party, won with 59.4%, comfortably ahead of Marcelo Freixo, a respected human rights activist with the leftwing Socialism and Freedom party. The third-placed candidate, knocked out in the first round, was also an evangelical conservative, Flávio Bolsonaro, whose father Jair – a national deputy – dedicated his impeachment vote to a dictatorship-era torturer.

Crivella, a former gospel singer and nephew of the founder of his powerful church, was running for the third time. His conservative religious background, as well as accusations of fraud, were cited as negative factors in his two previous attempts, but they may have worked in his favour this time.

Supporters of Marcelo Freixo react after hearing their candidate lost the election to Marcelo Crivella in Rio de Janeiro. Photograph: Tasso Marcelo/AFP/Getty Images

Evangelicals have long been increasing their influence in traditionally Catholic Brazil. As well as growing numbers of followers (about a fifth of the population, according to the last census), their electoral impact has been boosted by recent campaign financing reforms, which restrict corporate donations but continue to allow churches to direct their congregations – and their TV and radio channels – towards favoured candidates.

They are also making greater inroads into the longer established parties that form the base of the centre-right coalition of President Michel Temer. The biggest gains in this month’s elections were made by the rightwing Brazilian Social Democratic party (PSDB), which won São Paulo. Temer’s Brazil Democratic Movement party largely held its ground to retain the biggest number of mayoralties in the country.

Several leaders of these parties, along with Crivella, who denies wrongdoing, have been reportedly named in testimony in the Lava Jato scandal, but they came out of the elections not only unscathed but victorious.

People queue to vote in the elections which have seen a record number of spoiled or blank ballots. Photograph: Marcelo Sayao/EPA

Some blame this on the bias of the media and the judges involved in the investigation. “Lava Jato contributes to discrediting the political system as a whole. The voters are finding themselves not believing in politics as a whole,” said João Feres Jr, of the Institute of Social and Political Studies at Rio de Janeiro State University. “The big winners here are the PSDB, who have taken control despite losing the [last presidential] election. They hold several key ministries in the Temer government, and are able to push through conservative reforms.”

Others expect the move to the right to continue now that fiscal conservatives and evangelical leaders hold more powerful positions. The rise of the religious right – and the more morally intrusive government that it may bring – generates fear and hope, depending on what side of the political spectrum you are on.

Marcelo Freixo thanks supporters after losing the Rio mayoral election to Crivella. Photograph: Tasso Marcelo/AFP/Getty Images

At a Crivella rally last week, supporters were already in a celebratory mood, dancing to a campaign song which included countless mentions of Lava Jato. Everyone the Guardian spoke to played down the link between politics and religion, but all were members of the candidate’s church and expected bigger changes to come.

“The old interests are still in power, but Crivella is different. He’s pure,” said Karine Cruz, a student. “We’ll see more corrupt people going to prison. Lava Jato was an attempt to clear up politics. But it is only the beginning of something bigger.”

Rio – once famed as a party capital, then as an Olympic host – looks set to enter a conservative new era.

Additional reporting by Shanna Hanbury