SAN SALVADOR — First, President Nayib Bukele banned visitors from high-risk countries — not just China, South Korea and Iran, but also France and Spain, among others. He brought in new equipment to check the temperatures of incoming passengers. He sanitized the international airport.

Then, on Wednesday, he declared an Alerta Naranja — an orange alert. He announced a national quarantine, shuttering schools for three weeks, banning gatherings of more than 500 people, barring foreigners from entering the country and imposing a 30-day quarantine on Salvadorans entering from abroad.

Other countries have taken similar steps. But one fact sets El Salvador apart: It hasn’t confirmed any cases of the novel coronavirus.

Nonetheless, Bukele has been far ahead of his neighbors in his reaction to covid-19, which the World Health Organization declared a pandemic on Wednesday.

“I know this will be criticized, but let’s put ourselves in Italy’s shoes. Italy wishes they could’ve done this before,” he said in a national address on Wednesday. “Our health system is not at Italy’s level. It’s not at South Korea’s level.”

Nearly a third of the population in this Central American nation of 6 million live in poverty. Public health analysts have warned that poor and marginalized people are at a heightened risk as the virus spreads.

El Salvador earlier banned travelers from China, South Korea, Italy, Iran, France, Spain and Germany, countries with the most confirmed cases of the virus.

But the quarantine struck some analysts as strange, given the lack of cases in El Salvador.

“Why would a country declare quarantine without any confirmed cases?” asked epidemiologist Gerardo Chowell-Puente, chair of the department of population health sciences at Georgia State University.

He wondered whether Salvadoran authorities had seen factors that indicate trouble ahead.

“It gives the impression they are seeing a surge in hospitalizations and that may be overwhelming the system,” he said. “I don’t think someone would declare a quarantine suddenly without evidence of a substantial outbreak.”

Bukele emphasized Wednesday that the country had not yet had a confirmed case of the virus. “And not because it hasn’t been detected,” he said. “The necessary tests have been conducted and they’ve been negative.”

The government said 56 people were under quarantine. It was unclear whether any of them have been tested for covid-19.

The center-right Bukele, 38, a charismatic former mayor of San Salvador, was elected last year as a political outsider — the first president in decades not backed by one of El Salvador’s two main political parties.

“He feels free to take tough-looking measures, which are often troubling to civil libertarians,” said Geoff Thale, president of the Washington Office on Latin America. “And he takes steps, like closing schools for three weeks, which aren’t necessarily the most appropriate measures in a country without any confirmed cases.”

Thale said the measures could be the president’s way of appearing “proactive and forceful” but could add to the impression “he’s willing to take pretty authoritarian steps.”

Bukele incurred public outrage last month when he sent uniformed military personnel into the National Assembly in an apparent attempt to intimidate legislators into passing a security funding bill. It was an ominous move in a country with a history of military dictators.

“He’s gambling on what this will do to his international image,” Thale said. “And this may have more to do with that than with whether health authorities would recommend these steps.”

The atmosphere at the PriceSmart in the upscale Santa Elena neighborhood of Antiguo Cuscatlan was frenzied Wednesday as shoppers stocked up on toilet paper, frozen food, rice and beans.

Some shoppers said the chaos was worse than the disease.

Roxanna Peterson, 36, gestured to the brimming shopping carts that snaked through the market’s produce aisles. Her own cart held eggs, dog food and a week’s worth of baby formula. Shoppers said they were allowed to take only three of each item.

“I’m not worried about the virus at all, I’m worried about all this” Peterson said.

She said Bukele’s measures were only fueling the mania: “I think he’s being too much. He’s causing all the frenzy.”

The International Women’s Media Foundation provided support for this reporting as part of the Adelante Latin American Reporting Initiative.