The presidents of Mexico and Brazil scored stunning election victories in 2018 in defiance of the political establishment, but now their unwillingness to follow consensus on the coronavirus pandemic has left the two increasingly exposed.

Mexican leftist Andres Manuel Lopez Obrador and right-wing Brazilian President Jair Bolsonaro have swum against the tide of scientific opinion — talking down the risks, delegating responsibility and flouting advice given to the public.

Opinion polls suggest their apparent nonchalance concerns voters, but that has not stopped them falling out of step with many other world leaders — including U.S. President Donald Trump, who has also been accused of underestimating the threat.

Contrarian and prickly toward criticism, the two sexagenarians have shown they would rather govern for their core voters than from the center, said Sabino Bastidas, director of Pensar Diferente, a political consultancy in Mexico City.

“Both men have been in denial over the phenomenon. Both have hesitated to take decisions. Both have challenged the science,” he said.

Some global leaders cast the outbreak as the greatest challenge facing the planet since World War II. Some have even gone into quarantine.

On March 10 in Miami, Bolsonaro labeled the pandemic a “fantasy” exaggerated by the mainstream media. His attitude sparked anger in Brazil, with housebound protesters banging pots and pans to shouts of “Bolsonaro out!” last week.

Under fire, the former military officer dug in deeper. Last weekend he described efforts to step up quarantining in Sao Paulo as “hysteria.” Bolsonaro argued that severe restrictions were an “overreaction” that could do unnecessary damage to the economy — echoing Trump, his political idol.

He did, however, appear in public wearing a face mask.

Lopez Obrador dismissed that idea, instead producing from his pocket religious charms that he says will keep him safe.

Claiming that the “greatness” of the Mexican people will defeat the virus, Lopez Obrador has faced the threat by fusing his knack for homespun sentimentality to a political message that he has hammered home relentlessly: He is cleaning up government.

“The protective shield is honesty. That’s what protects: the nontoleration of corruption,” he said last week.

So as officials and allies were urging people to stay at home and avoid physical contact, Lopez Obrador last weekend again shook hands with dozens of supporters in southern Mexico — then issued a video urging people to keep going out.

Lopez Obrador argues that he must keep up people’s spirits and that to suppress activity would hit poorer Mexicans, his core constituency. Critics say those are the very people most at risk from the virus.

With the coronavirus spreading in Mexico, which now has 367 confirmed cases and four deaths, the government on Tuesday stepped up its response, banning meetings of over 100 people. It has not imposed strict quarantines or travel bans.

Brazil’s confirmed cases tripled in four days to 1,891 on Monday as related deaths rose to 34, the government said.

Both Mexico and Brazil have been particularly hard hit in the global market rout sparked by the pandemic, with their currencies at record lows. The Mexican peso is the world’s worst-performing currency this year, down 25 percent against the dollar. The real is not far behind, down 21 percent.

Mexico was already in recession when 2020 began, dragged down by a drop in investment amid concerns over Lopez Obrador’s unpredictable management of the economy.

But, with the peso plunging, rather than seeking to shore up confidence among investors, the president ordered a referendum to go ahead last weekend on whether to scrap a largely completed billion-dollar brewery in the northern city of Mexicali.

Only a tiny proportion of the local electorate went out to vote, but those who did overwhelmingly rejected the huge plant, arguing that it was a threat to local water supply.

The peso dived again. Analysts said the Mexicali referendum had done further damage to investor confidence in Mexico.

Some members of his own party are so alarmed by his behavior that in private they say they are glad that Trump, who is widely reviled in Mexico, has forced him to adopt stricter containment measures such as halting border tourist traffic.

The turmoil has taken a toll on his popularity. Lopez Obrador had approval ratings of 80 percent in some surveys barely a year ago. A daily tracking poll by the polling firm Consulta Mitofsky now puts him on the brink of dipping below 50 percent.

Meanwhile, a poll showed Brazilians were more impressed by the tougher line taken by state governors against the pandemic than with Bolsonaro’s response.

Both men have a tendency to dismiss criticism as evidence of a plot against them.

“(Lopez Obrador) is never going to say, ‘I made a mistake.’ Never,” said Polimnia Romana Sierra, a former close aide to the Mexican president.

His self-belief and single-mindedness were a great virtue when he was in opposition because it enabled him to defeat what many considered insurmountable odds to win the presidency at his third attempt, she said.

But for him now to defy science and invoke higher powers to protect Mexico was “highly irresponsible,” Sierra said.

“Because he’s the example that millions of Mexicans are going to follow,” she said. “Mexico is a paternalistic country; we’re always going to respect the president.”

RELATED PHOTOS President Jair Bolsonaro makes a statement on Brazil's COVID-19 outbreak in Brasilia on Friday. | REUTERS