The editorial board of the Wall Street Journal has endorsed far-right Brazilian presidential candidate Jair Bolsonaro.

Bolsonaro, the frontrunner, has been widely criticized for having expressed misogynistic, homophobic, and militaristic views.

Tens of thousands of Brazilians have protested against the candidate.

"Global progressives are having an anxiety attack" at Bolsonaro's popularity, the editorial says.

The editorial board of the Wall Street Journal has endorsed far-right Brazilian presidential candidate Jair Bolsonaro, a far-right candidate who has previously said that he would be "incapable of loving a homosexual son" and that ugly women don't "deserve to be raped."

In an editorial with the headline "Brazilian Swamp Drainer," The Journal writes: "After years of corruption and recession, apparently millions of Brazilians think an outsider is exactly what the country needs. Maybe they know more than the world’s scolds."

Bolsonaro, a member of the Social Liberal Party who's been dubbed the "Brazilian Donald Trump," is the frontrunner for the presidency.

Tens of thousands of people who take issue with his at-times misogynistic, homophobic, and militaristic views have taken to the streets in protest and used a hashtag that translates to #himnot.

Tens of thousands of people protested in different cities across Brazil against presidential candidate Jair Bolsonaro. Victor Moriyama/Getty Images

The Journal criticizes Bolsonaro's opponent, left-wing Fernando Haddad, and frames Bolsonaro's popularity in light of Brazil's current political climate: "After so much political turmoil and corruption, it’s hardly surprising that Brazilians are responding to a candidate who promises something better."

In 2011, Bolsonaro told Playboy magazine that he would "be incapable of loving a homosexual son."

"I won’t be a hypocrite: I prefer a son to die in an accident than show up with a mustachioed guy. He’d be dead to me anyway," he said.

In 2014, he suggested a female colleague in congress was too ugly to be raped. "She doesn’t deserve to be raped, because she’s very ugly," Bolsonaro said at the time. "She’s not my type. I would never rape her. I’m not a rapist, but if I were, I wouldn’t rape her because she doesn’t deserve it."

He also once described Afro-Brazilians as lazy and fat, and called refugees from Haiti, Africa, and the Middle East as the "scum of humanity." He also said he would withdraw Brazil from the 2015 Paris Agreement on climate change, arguing that global warming is nothing more than "greenhouse fables."

Back in the early 1990s, he suggested he was in favor of a dictatorship and in 2015 he defended the brutal dictatorship that presided over Brazil from 1964 to 1985, which was responsible for numerous atrocities.

More recently, Bolsonaro in September suggested his political opponents should be shot. The same week, Bolsonaro was stabbed along the campaign trail, an incident that saw his poll numbers rise.

The Journal dismisses concerns that Bolsonaro's praise for the military and sometimes military rule as "he isn't proposing to change the constitution, which constrains the military at home," unlike his opponent, who has suggested a constitutional change that would give the president more power.

"This is from the Hugo Chávez playbook," the newspaper writes.

The editorial says that "global progressives are having an anxiety attack over the near-triumph Sunday of Brazil's conservative presidential candidate Jair Bolsonaro." On Sunday, Bolsonaro won 46% of the vote in the first round of the election. If he had reached 50%, he would have won the race outright.

His opposition, former Sao Paulo mayor Fernando Haddad, won just 29%, making Bolsonaro the presidential frontrunner. The vote takes place on October 28.

The Journal notes that Haddad is "the hand-picked candidate of former president Luiz Inácio Lula da Silva, who is serving a 12-year sentence for bribery but remains a hero of the left."

The Journal's editorial board, separate from its news and business reporting, has a conservative leaning. It has not endorsed a US presidential candidate since 1928.