Mexico’s president, Andrés Manuel López Obrador, said Sunday that he had contracted the coronavirus and was undergoing “medical treatment” for what he described as mild symptoms.
Mr. López Obrador, writing on Twitter, said he would continue to carry out his official duties, including holding a call with President Vladimir V. Putin of Russia that is set for Monday.
“As always, I am optimistic,” he said.
The Mexican leader has consistently played down the pandemic, questioning the value of wearing masks and refusing to wear one himself in most public appearances.
On Friday, he posted a photo of himself indoors, again without a mask, conducting a call with President Biden. He was accompanied by Marcelo Ebrard, the foreign minister, and Alfonso Romo, a former top aide — and neither was wearing a mask. And on Saturday, the president met with local business leaders in Monterrey.
Hours before disclosing that he had contracted the virus, Mr. López Obrador, who flies commercial on all official trips, sat in coach on a flight from San Luis Potosí to Mexico City, according to local media reports.
As late as June, Mr. López Obrador was still sounding dismissive. He said that having a clean conscience would help fight off the virus. “No lying, no stealing, no betraying, that helps a lot to not get coronavirus,” he told reporters.
And for months, the president has repeatedly insisted that the end of the pandemic’s devastation was just around the corner.
“The worst is ending,” he said this month, as deaths surged. “We are coming out of it.”
In the spring, The New York Times reported that the Mexican government had failed to record hundreds, possibly thousands, of deaths in Mexico City, dismissing officials who had tallied more than three times as many fatalities in the capital than the government had publicly acknowledged.
Then in December, federal officials, loath to damage the economy still further, reassured the public that Mexico City had not reached the level of contagion that would require a full lockdown. In fact, the government’s own numbers showed that the capital had surpassed that threshold, an analysis by The Times found.
Some public health experts said they were little surprised that Mr. López Obrador had become infected, given his preference for going mask free, even in situations where the risk of exposure was high.
“One even expected or assumed, because of his way of exposing himself to so many people and not wearing a mask, that he would have been infected earlier,” said Carlos Magis Rodríguez, professor of medicine at the National Autonomous University in Mexico. “In all the public appearances of López Obrador, except for when he went to visit Trump, we saw him without a face mask.”
He said there was reason for concern about the prognosis for Mr. López Obrador, who is 67 and had a heart attack in 2013. “He’s at greater risk than a young person,” Dr. Magis said.
Mr. López Obrador has told reporters that he will wait to get vaccinated with the rest of his age group, most likely in mid-March.
The news came as Mexico is confronting its worst moment since the pandemic began, with deaths hitting horrific highs. On Thursday, Mexico confirmed 1,803 new coronavirus deaths, surging past the previous record of more than 1,500 set days earlier.
And while the president is already being treated, many Mexicans are struggling to get medical care. The country’s hospitals are overrun, and close to 90 percent of beds in Mexico City, the epicenter of the national outbreak, are occupied.
Mexico has intentionally kept testing low throughout the pandemic, which has obscured the true extent of the virus’s reach across the country. But it is undeniable that Mr. López Obrador has presided over one of the worst outbreaks in the world.
To date, the country has recorded more than 1.7 million coronavirus infections and nearly 150,000 deaths, the fourth-highest global death toll.
Official numbers severely underestimate the true toll of the pandemic. As of December, the country had recorded 250,000 more deaths than expected, an excess mortality rate that suggests the pandemic has been far deadlier than official numbers suggest.
Kirk Semple and Elda Cantú contributed reporting.