China locked down mega­cities. Italy has put its entire populace into quarantine. Now New York’s governor has turned the town of New Rochelle into a “containment zone.”

As the coronavirus continues its spread, officials are beginning to consider whether the United States should enact the type of large-scale, mandatory lockdowns touted by Beijing and praised at times by World Health Organization officials.

The simple answer, according to experts, is no. But as the United States considers its next moves, there are lessons to be learned from what happened in China and other countries where cases are declining.

Striking a balance with measures that are effective but not inordinate is critical, according to public health researchers who warn that extreme policies such as mandatory regionwide quarantines could run into ethical, legal and logistical problems or even backfire.

Instead, ramping up testing capacity, quickly isolating sick or suspected patients, and introducing policies that limit public gatherings or require working from home have proved effective in China, Hong Kong, Singapore and South Korea.

“China’s most effective measures can be undertaken without violating human rights,” said Thomas J. Bollyky, a senior fellow at the Council on Foreign Relations and director of its Global Health Program. Actions such as “suspending public transport, limiting public gatherings, preparing their health-care system, testing significant numbers: Those are all things we should be doing in the United States.”

And for them to succeed, U.S. officials need to be radically transparent to win the public’s cooperation and trust.

“It means our leaders being as truthful and honest as possible, including admitting mistakes and things we simply don’t know,” said Wilbur Chen, an infectious-disease physician at the University of Maryland. “The solution is not as simple as announcing a lockdown, because the second you do that here, you’re going to have people panicking and jumping into their cars, which is the exact opposite of what you’re trying to achieve.”

“Lockdown” isn’t a legal or medical term, but public health experts have researched the effectiveness of “cordon sanitaires” — a term for a geographical barrier put in place to stop the spread of infectious disease. This is similar to what Italy has implemented in declaring the entire country a “red zone” in which public gatherings are banned and people can travel to, from and within Italy only if deemed necessary for work or an emergency.

Italy also plans to clamp down on commercial activity to prevent the spread of the coronavirus. The government announced on Wednesday that only essential businesses, such as farms, pharmacies and supermarkets, would be allowed to operate; most others would be forced to close. Prime Minister Giuseppe Conte did not specify when the measure would go into effect.

The containment zone set up in New Rochelle, N.Y., may not be considered a cordon sanitaire because residents are still free to move around, but all public gatherings have been canceled.

The effectiveness of such measures depends in part on how they are implemented, epidemiologists say.

On one end of the spectrum, some governments make lockdowns voluntary, relying on community compliance. On the other end, authorities enforce them with police patrols, fines and military-style checkpoints.

China’s lockdowns landed squarely on the latter side.

Beijing has faced stark criticism for first trying to conceal the outbreak, which started in December. On Wednesday, national security adviser Robert C. O’Brien said China ignored “best practices” by censoring doctors and blocking foreign health experts, spurring the spread of the virus.

During the week of Jan. 20, with tens of millions about to travel for the Lunar New Year holiday, Chinese officials began shutting down Wuhan, the center of the outbreak, and several nearby cities in an unprecedented quarantine effort.

The WHO has said the world should be grateful for the measures, but scientists and public health experts say that locking down Wuhan was not necessarily a game changer — and that it came at an unprecedented human and economic cost.

Using disease transmission modeling, a study published in the journal Science found that China’s Jan. 23 ban on travel in and out of Wuhan slowed domestic spread by only three to five days because, by the time it was implemented, more cases had been diagnosed in other Chinese cities.

The same modeling found that the travel ban slowed international spread by a matter of weeks but not enough to reduce the virus’s long-term effect — an important lesson for other governments as they determine next steps.

“Real questions need to be asked about what impact the lockdown had on limiting supplies and health-care workers, inciting panic, overburdening hospitals, increasing transmissions by concentrating people into areas,” said Alexandra Phelan, a global health lawyer at Georgetown’s Center for Global Health Science and Security.

The Chinese government’s sudden shift from denial to drastic measures also eroded public trust. Social media outlets were flooded with a disorienting mix of rumor, real news and propaganda. Across rural China, villages barricaded themselves and tore up roads in fear and desperation.

To hold the line, officials took extreme enforcement measures. In big cities, neighborhood officials locked frightened citizens inside their apartment complexes. Residents were allowed to walk a few steps beyond their property gates to retrieve deliveries, but to venture farther, they needed to obtain a travel pass from volunteers sporting red arm bands.

One resident of Hangzhou, in Zhejiang province, who spoke on the condition of anonymity because he feared official reprisal, said neighborhood officials locked his quarantined family inside their apartment with a padlock and removed it days later after he complained that they would be at extreme risk if there were a fire.

“For this to work, we need a balance between health and civil liberties,” said Lawrence Gostin, a professor of global health law at Georgetown University who provides technical assistance to the WHO. “We haven’t seen that balance.”

Health experts say the United States has the enormous advantage of learning from the painful experiences of other countries, including China.

“The prime strategy for containing the virus has been quick diagnosis, quick isolation, quick treatment,” said Ivan Hung, chief of infectious diseases at the University of Hong Kong’s medical school.

After a delayed initial response, Hung said, China did well by aggressively increasing production of test kits, taking over hotels and school dormitories to quarantine suspected cases, and building new facilities to isolate patients.

Some of China’s efforts at “social distancing” seem to be effective.

In cities such as Beijing, some restaurants and cafes require diners to sit several feet away from one another. Supermarkets enforce a one-in, one-out policy; shoppers lining up outside must stand several feet apart.

South Korea is also instructive. On Tuesday, it reported 131 new cases compared with its peak of 909 on Feb. 29 — a sign that its policies of widespread testing, rapid tracing and isolating the infected are having an effect.

Hong Kong has also been able to hold the line through isolation, contact tracing — essentially, gathering information about people who come in contact with a confirmed case — and school closures.

Officials including the WHO and Vice President Pence, who is leading the U.S. response, have touted Singapore as one of the best models to emulate.

The Singaporean government reacted quickly with aggressive measures without resorting to lockdowns, instead focusing on tracking the virus.

The government mounted enormous teams for contact tracing, using law enforcement tools such as surveillance footage and receipts to see where and with whom people with the virus had come into contact — without consent, if necessary.

A study last month by epidemiologists at Harvard University suggested that if other countries worldwide had the testing and tracing capacity of Singapore, the number of confirmed cases would multiply by 2.8 times.

The government also put teeth to its orders — more than some Western democratic states might be comfortable with.

Singaporean authorities, for example, criminally charged a couple who lied about their travel history and revoked the residency of a man who broke his medical quarantine.

Not everything that works in one country will work in others, perhaps especially the United States, noted Chen, the University of Maryland doctor.

“This is a country that is built on individual rights and independence, and that’s a great thing. It also means there are real differences, including what we’re willing to tolerate from our government. I don’t think a China-style lockdown would work.”

Shih reported from Beijing.