ISTANBUL — Iran is emerging as the center of an outbreak of the new coronavirus across the Middle East, where cases in at least five countries have been linked to patients who traveled to Iran in recent weeks, authorities said.

In Iran, 139 people have contracted the virus, including the deputy health minister and a prominent member of parliament. Nineteen people have died, according to the Health Ministry — the largest death toll from the virus outside China, where it first appeared.

The government has struggled to contain the spread of infections after reporting the first confirmed cases in the holy Shiite city of Qom last week. Since then, the virus has appeared in multiple Iranian cities, and infections in Bahrain, Iraq, Kuwait, Lebanon and Oman have been traced back to Iran.

Several countries have halted flights to Iran. On Wednesday, Bahrain said the number of coronavirus infections in the island nation had risen to 26, after three more cases were detected among people who had recently returned from Iran, state media reported.

In Iraq, which borders Iran, authorities closed crossings along the frontier, and medical teams at the country’s airports monitored arriving passengers after five people were confirmed to have been infected. Hundreds of thousands of Iranians visit Iraq’s holy city of Najaf each year, and shrines and schools there were shuttered Wednesday and the streets largely empty, residents said.

But even as regional governments moved to control the outbreak, Iranian authorities came under fire for what critics said is an inadequate response to the threat. Officials have rejected calls to quarantine major cities and have allowed communal prayer services to continue in places such as Qom, where the virus first emerged in Iran. Nurses and other medical personnel have complained in interviews and on social media that authorities were preventing health workers from wearing masks and were forcing staff to buy their own gloves.

“The equipment we have and the protective measures in place are all very primitive. The situation is critical,” said one nurse at the Shariati teaching hospital in Tehran. She was reached by telephone and spoke on the condition of anonymity to freely discuss her working conditions.

The hospital, she said, lacks coronavirus testing kits and was attempting to diagnose patients through their symptoms and chest X-rays.

The virus, officially called SARS-CoV-2, causes fever, cough and mild to severe respiratory illness. But some relatives of patients who died of the disease, named covid-19, as well as nurses in other hospitals, said few people exposed to the virus were being screened or tested, according to posts on social media. One man who spoke to Radio Farda, a U.S.-funded Persian-language broadcast service, said he was forced to bury his 83-year-old mother after she died of covid-19 in Qom.

Despite the growing concerns, President Hassan Rouhani on Tuesday urged fellow Iranians to "continue work and other activities." He said "enemy plots" were to blame for "spreading fear and closing down the country."

Rouhani made the remarks on the same day that his deputy health minister — and head of Iran’s task force against the coronavirus — was diagnosed with the virus. On Monday, Iraj Harirchi was shown coughing and sweating profusely as he briefed reporters on the outbreak in a government building in Tehran.

“With regard to quarantines, we are absolutely against them. . . . [They] belong to the pre-World War era, for the plague, cholera, stuff like that,” Harirchi said, wiping his brow and taking sips of water.

The next day, Harirchi posted a video online announcing that he has the virus. Another prominent official, reformist lawmaker Mahmoud Sadeghi, also said he tested positive for the virus that causes covid-19.

“The government appears unable to grasp the scope or severity of the coronavirus outbreak. Supreme Leader Ali Khamenei and Rouhani are probably unwilling to take decisive steps that could unsettle a population already under extreme pressure from U.S. sanctions,” said Henry Rome, an Iran analyst at the Eurasia Group, a political risk consultancy.

“But this political decision has undermined containment efforts, such as outbreak surveillance, travel restrictions or quarantines,” he said. “Government inaction could set the stage for a broader outbreak in the country, increasing the risk to other Middle Eastern countries.”

In Iraq, for example, the Interior Ministry said that more than 8,000 Iraqis have returned from Iran in recent weeks and that it would be adopting measures to test and quarantine them. It was unclear, however, how or when earlier arrivals would be traced or monitored.

Doctors said Iraq’s dilapidated health-care system would be ill-equipped to cope with a significant outbreak. Suspected cases were put under quarantine in Najaf, in the south, and in the northern cities of Mosul and Kirkuk.

“Those who have symptoms are put in isolation. Those who don’t are sent home with instructions about how to quarantine themselves,” said Rana Fakhry, a doctor working at the airport in Najaf, where Iraq’s first coronavirus case was reported.

“At this airport alone, there are five flights a day from Iran, 200 Iraqis on each,” she said. “We’re checking everyone.”

The Health Ministry said it has established hotlines in each Iraqi province so that residents can report symptoms or concerns. In the capital, Baghdad, the number appeared to be out of service, and in other provinces, the doctors who answered said they were fielding hundreds of calls.

“Our system is not modern. We don’t have proper space for quarantine or proper antibacterial measures to keep things clean,” said Yasser Maki, a dentist at a hospital in Najaf. “We’re not ready. We’re not ready at all.”

Loveluck reported from Baghdad. Mustafa Salim in Baghdad and Liz Sly in Beirut contributed to this report.