MEXICO CITY — Mexican President Andrés Manuel López Obrador announced Sunday night that he had tested positive for the coronavirus and was experiencing "light" symptoms. He said he would step away from his daily news conferences while being treated for the illness.

López Obrador has frequently minimized the severity of the pandemic and has rarely worn a mask, even as covid-19 has killed nearly 150,000 people in Mexico — the fourth-highest total in the world, and the 19th-highest as a percentage of the population, according to figures compiled by Johns Hopkins University.

After Mexico’s 70-day shutdown at the beginning of the pandemic, the president resumed his frequent travel through the country. He has been criticized for appearing in selfies with his supporters.

“I am sorry to inform you that I am infected with COVID-19,” López Obrador said in a tweet. “The symptoms are light, but I am getting medical treatment. As always, I am optimistic. We will carry on.”

He added that he would remain in his living quarters at the National Palace and would have a telephone conversation as scheduled on Monday with Russian President Vladimir Putin to discuss shipments to Mexico of the Sputnik V vaccine.

At 67, and with hypertension, López Obrador could be at risk of developing complications from the virus. He had a heart attack in 2013. Mexico has administered about 600,000 doses of the Pfizer vaccine, but the president has said he would wait for his shot until after front-line medical personnel and older citizens had received theirs.

Mexican authorities on Sunday reported 10,872 more confirmed cases of the coronavirus and 530 deaths. In total, the government has tallied more than 1.7 million cases. But the real total is thought to be higher: A recent government study based on antibody tests estimated that one-quarter of the population of about 126 million people has been infected.

The president has been regularly tested for the virus and insists that he keeps strict social-distancing rules in his office.

López Obrador, a folksy icon of the left, took office in December 2018. He has remained popular, with approval ratings of about 60 percent, despite the mounting death toll from covid-19 and a severe economic crisis linked to the pandemic.

But the president’s decisions to rarely wear a mask in public, and his statements playing down the pandemic, have frustrated many in Mexico.

“In a country where government and president are often the same thing, and where the president is a continuous presence both in social and traditional media, his minimizing of the pandemic and his refusal to wear a mask have definitely encouraged people to downplay the dangers of this deadly virus,” said Esteban Illades, a prominent Mexican journalist.

“Hopefully, the president’s covid diagnosis will show the general population that not wearing a mask makes it easier to become infected.”

Several cabinet members previously tested positive for the coronavirus. The president was in the state of San Luis Potosí over the weekend and was photographed without a mask.

Over the past two days, López Obrador has been in close contact with a range of senior Mexican officials, including the secretary of defense and the secretary of foreign relations, along with a number of well-known Mexican business leaders. There is now concern that the virus could spread widely within those circles.

Jaime Rodríguez Calderón, the governor of Nuevo León, met with López Obrador on Saturday and said he would “watch my symptoms so that if any appear, I’ll take a test.”

Carlos Bravo Regidor, a political analyst, said: “If you think about it, it is kind of surprising that [López Obrador] didn’t catch it before, particularly given his reluctance to wear a mask and his insistence on still having plenty of meetings with officials and even traveling, most recently to Guerrero, San Luis Potosí and Nuevo León.”

He noted that many public servants who frequently wear masks take them off in his presence — “probably as a very screwed-up sign of discipline or deference.”

Early in the pandemic, López Obrador was mocked for saying he could ward off the virus with religious amulets. His tone has since become more serious. The Mexico City region went into yet another shutdown in mid-December as cases soared during a period of holiday parties and shopping.

Critics have assailed the government for its handling of the pandemic, noting that the country has among the lowest percentage of testing of any nation in the hemisphere. López Obrador has defended his record, noting that Mexico scaled up its hospital capacity considerably and has placed orders for more than 100,000 doses of vaccine.

Contributing to the country’s high death toll are a number of factors, including widespread comorbidities such as obesity and diabetes, and Mexicans’ reluctance to go to the hospital until their cases are far advanced. In addition, nearly 60 percent of the population works in the informal sector, and many have needed to go to their jobs despite the pandemic precautions. López Obrador has been criticized for not approving a major stimulus program to help such people stay home.

The news of the president’s diagnosis ignited an outpouring of good wishes, both from his critics and supporters.

“You’re going to be fine President. I’m sure of that. Your strength, conviction and love for life and for what you represent give us this certainty,” tweeted Claudia Sheinbaum, the mayor of Mexico City and a close ally of the president. She survived the coronavirus last year.