Sao Paulo, Brazil (CNN) Jubilant supporters of Brazil's president-elect Jair Bolsonaro took the streets of Rio de Janeiro on Sunday after the far-right congressman was declared the winner of the country's presidential election by a wide margin.

Bolsonaro's victory caps ones of the most polarizing and violent political campaigns in Brazil's history, amid a prolonged recession, rising crime rates and widespread corruption scandals.

In a victory speech Sunday, Bolsonaro said he was a "defender of freedom" who would run a government that protected citizens who "follow their duties and respect the laws."

"The laws are for everyone, this is how it will be during our constitutional and democratic government," he said.

Bolsonaro was declared the winner by the Supreme Electoral Tribunal after 94% of the votes were counted, easily defeating his leftist ex-Sao Paulo mayor Fernando Haddad.

Supporters of far-right presidential candidate Jair Bolsonaro celebrate in front of his house in Rio de Janeiro on October 28.

The electoral tribunal released early results showing Bolsonaro leading with 55.54% of votes to Haddad's 44.46%, a difference larger than the amount of votes left to be counted.

But while Bolsonaro's supporters were rejoicing on Sunday, opponents voiced concerns that his victory could threaten human rights and ecological preservation in the world's fourth largest democracy.

Speaking earlier in the day, Haddad said Brazil's democracy was "at stake" in Sunday's vote. "I believe today is a great day for the country which has arrived at a crossroads," he said.

Troubled over Bolsonaro's promises to open up tracks of the Amazon rainforest to development, environmental groups warned his election would be a "profound setback."

"His reckless plans to industrialize the Amazon in concert with Brazilian and international agribusiness and mining sectors will bring untold destruction to the planet's largest rainforest and the communities who call it home, and spell disaster for the global climate," Amazon Watch program director Christian Poirier said in a statement to CNN.

Jair Bolsonaro waves after voting in the presidential runoff election in Rio de Janeiro on October 28.

Politically motivated violence

Bolsonaro won the first round of the elections in October amid a field of 13 candidates, but he fell short of the 50% needed to win outright and avoid a runoff against Haddad, from the Workers' Party.

"This has been an unprecedented election," said Marco Antonio Teixeira, a political science professor at the Getulio Vargas Foundation. "The rhetoric used by both candidates throughout the campaign has been extremely aggressive."

That hostility has carried over into the streets. Dozens of politically motivated acts of violence have been registered by voters, journalist and politicians.

Bolsonaro, 63, was stabbed in the stomach last month during a rally in the city of Juiz de Fora, in Minas Gerais state. When he went to cast his ballot on Sunday, the congressman wore body armor and arrived by the back entrance.

The stabbing took him off the campaign trail for weeks as he recovered. But it strengthened his position among Brazilians looking for a change.

Bolsonaro's increased visibility prompted a social media backlash known as #elenao, or #nothim, which gained support throughout the country and internationally.

During his Brazil tour, Pink Floyd co-founder Roger Waters exhibited the slogan on stage in neon lights and chanted "ele nao" with the crowd.

Protesters have also taken the chant to the streets during a recent "Women Against Bolsonaro march" in Sao Paulo.

"Bolsonaro has opened a Pandora box," protest organizer Luka Franca said. "He's given a voice to an ultra right population who want to voice their prejudice and annihilate anyone who is different."

Supporters of far-right presidential candidate Jair Bolsonaro celebrate in Rio de Janeiro on Sunday.

Ugly rhetoric

Bolsonaro, who has been compared to US President Donald Trump and Philippines President Rodrigo Duterte, has stirred controversy by making misogynistic, racist and homophobic remarks.

He once told a congresswoman that she did not deserve to be raped because she was "very ugly," Brazil's TV Globo reported.

He also said publicly he'd prefer to see his son "die in an accident" than a member of his family be homosexual.

"This negative discourse he's spreading is killing people," Felipe Lago, a 29-year-old fashion producer told CNN. "If he wins, who knows what will happen to us?"

A banner promoting Workers' Party presidential candidate Fernando Haddad during a rally in Brasilia.

Lago created an Instagram account called "elenaovaoinosmatar," or "he won't kill us" in English, shortly after being verbally assaulted and threatened by a group of Bolsonaro supporters for being gay.

"Although I was scared, I decided to post what happened to me on Facebook," Lago said. "I got a lot of responses from friends and others saying the same thing happened to them."

His Instagram account has more than 100,000 followers and includes videos of others who say they experienced similar assaults.

In their final days on the campaign trail, both Bolsonaro and Haddad asked their supporters not to engage in violence.

Keeping out the Workers' Party

For some Brazilians, like teacher Alexandre Vastella, voting for Bolsonaro was more about keeping the Workers' Party (PT) out of office.

"I want Bolsonaro to be President, not because he's the ideal person, but because we can't risk letting the PT back in power," Vastella told CNN. "Sure, all of the major parties are corrupt but the PT created an infrastructure of corruption."

The Workers' Party governed Brazil for more than 13 years under President Luiz Inacio Lula da Silva, from 2003 to 2011, and his successor Dilma Rousseff, from 2011 to 2016.

Lula, as he is popularly known, left office with a 83% approval rating, after his policies helped lift millions of Brazilians out of poverty.

Many politicians, including Lula, were caught in a wide-ranging, 4-year anti-graft probe known as "Operation Car Wash." He was arrested in April and given a 12-year sentence for corruption and money laundering.

Despite the arrest, Lula was running for a third term and leading in the polls until he was barred from running by the country's top electoral court in September. His running mate, Haddad, replaced him on the ballot and became his party's default candidate.

Voting is compulsory in Brazil, but some undecided voters, like Sao Paulo resident Mauricio Soares, had chosen to vote null or blank.

"The decision of voting null came after a lot of thought and I am firm in my decision," Soares told CNN. "I am not neutral. I am positioning myself against both candidates."

Teixeira, the professor, said the winner must bridge the divide caused by the campaign.

"If the next president only governs for his supporters, the divisiveness we're living will remain. If he chooses to govern for the whole country, there is a greater chance these conflicts will be minimized or disappear," Teixeira said.