ROME — Italy on Wednesday dramatically ramped up the severity of its national lockdown to control the spread of the coronavirus, ordering a halt to nearly all commercial activity aside from supermarkets and pharmacies, while bringing the country to a near-
total economic standstill.

The measures marked one of the most drastic policies imposed by a modern democracy and followed a day in which cases accelerated across Europe, with German Chancellor Angela Merkel warning that more than two-thirds of Germany's nearly 83 million people could be infected before the outbreak ends.

In Italy, where there have been more than 12,000 confirmed cases and 827 deaths, the health crisis is escalating so quickly that the country has found itself willing to upend normal life and take an economic cliff dive — all in a bid to keep people indoors, reduce infections and stave off an even deeper emergency in its hospitals.

"Right now the whole world is looking at us," Prime Minister Giuseppe Conte said, telling Italians to leave their homes "only when strictly necessary."

Once the new steps take effect — Conte did not specify when — only the most essential parts of society will continue to function. Farms can still produce food, factories can still churn out products, and public transportation will still function.

The steps might have seemed unimaginable to Italians even a week ago. But the pace of the virus's growth — mixed with worrying depictions of a teetering health system — has caused a day-by-day national transformation, with people moving from grief toward acceptance about the extent of the changes in their lives.

"You're changing your life's habits, making sacrifices, but these renunciations are offering a great, precious contribution to the country," Conte said. "Italy is showing it's a great community, united and responsible."

On Monday, Conte had imposed a nationwide lockdown, limiting travel abroad and across regions. With it came other restrictions: the closure of theaters, museums, sporting events. But Italy had still been operating at a crawl. Gelaterias were open, with people lining up several feet away from one another. Barber shops were open. Cafes were also open, though with limited hours and restrictions on the number of people allowed inside.

Conte received strong political pressure from politicians in Italy's northern regions, at the epicenter of the outbreak, to further tighten the measures.

For other countries in Europe, Italy is the example they are trying to avoid. The number of people who had died of the virus there had risen from 366 to 827 in the past three days.

Other European countries so far have put off similar, stringent restrictions, and Merkel on Wednesday did not announce any new guidelines to mitigate the spread.

“The virus has arrived,” she said, speaking at a news conference in Berlin, the first time she had addressed the public on the issue. She urged the whole country to help work to slow the spread of the disease, as a slower infection rate would help ease the burden on the health-care system.

If there continues to be no vaccine or treatment options, 60 to 70 percent of people in Germany could be infected, Merkel said. With older people and those with preexisting health conditions at risk, “we must make sure that we protect these people and slow the expansion of the virus,” she said.

In Germany, at least 1,296 people have been infected, and two have died.

Germany has faced criticism from some quarters for being slow to act. The country, which has a federal system, has also struggled to get states to comply with the Berlin government’s recommendations that gatherings over 1,000 people should be stopped, especially in the midst of soccer season.

An infection rate of 60 to 70 percent is in line with some of the worst-case estimates from epidemiologists for the virus’s spread globally. Marc Lipsitch, an epidemiologist at Harvard University, has said 40 to 70 percent of the world’s population could be infected, though control measures could be “extremely effective” in countries that have had time to prepare.

Czech Prime Minister Andrej Babis said Merkel’s comment was “unhelpful” and could cause panic. The Czech Republic had enacted strong enough measures for such “worst-case scenarios to be out of the question,” he was quoted saying by CTK news agency.

In Italy, Giovanni Rezza, head of the infectious disease department at the Italian National Institute of Health, said that it appeared Germany was giving up on containment and that the Germans should take heed of the toll coronavirus is taking farther south. “What is happening in northern Italy is happening in front of their eyes,” he said.

Policymakers across Europe have watched the rapid mushrooming of cases in Italy. Despite having one of the best health-care systems in Europe, Italian hospitals are pushed to their limits. Other countries are worried about having to confront the same stresses.

German Health Minister Jens Spahn said that his country has 28,000 intensive-care beds, about 25,000 of which have ventilation capacity, but that many are in use and that hospitals need to make plans to “deal with as many patients as possible.”

But the coronavirus response across Europe has been haphazard, with little policy unity in the face of a virus that does not recognize international borders, particularly those that allow freedom of movement. While some countries, such as Germany, seem resigned to the fact that the virus will spread through the population, others are still fighting to contain it.

Hungary, with 12 confirmed cases, said Wednesday that it was banning travelers from China, Iran, Italy and South Korea. Austria and Slovenia had announced the previous day that they were closing their borders to Italians. Meanwhile, Switzerland was allowing entrance by Italian workers, and France kept its border with Italy open.

European capitals have likewise taken different approaches to containment from within. While Italy has imposed a dramatic national lockdown, and Poland and Denmark announced Thursday they would join those closing schools nationally, some other European governments have recommended only hygiene and social distancing.

The European Union has also seen fights about sharing protective equipment, such as face masks, as countries worry about having shortages of their own as the virus hits.

Germany last week banned the export of medical equipment except in special circumstances. Merkel said the ban didn’t mean that there would be no exports but was intended to ensure that equipment ended up in the “right hands.”

European Council President Charles Michel this week called for more coordination in stopping the spread of the virus, stemming the economic fallout, developing a vaccine and ensuring access to medical supplies. He announced a 7.5-billion-euro ($8.5 billion) fund to assist the continent’s health-care systems and economies.

It was China, however, that stepped in to fill an urgent emerging need for ventilators in Italy on Tuesday, agreeing to send 10,000, plus more than 2 million face masks.

“The response from other European countries was not encouraging, and this was a pity,” Rezza said.

Stefano Pitrelli in Rome and Luisa Beck in Berlin contributed to this report.