But Mr. Modi did not make clear how people would get food, water and other necessities during the lockdown, or how they would maintain a safe distance from one another in the cramped spaces where many now live.

The Home Ministry issued a statement after Mr. Modi spoke saying that food shops, banks, gas stations and some other essential services would be exempt from the lockdown. But the ministry warned that anyone who refused to follow the restrictions faced up to a year in jail.

Mr. Modi acknowledged that his decree would create “a very difficult time for poor people.”

Even before he spoke, confusion about India’s restrictions was widespread. Police officers have aggressively shut down some food stores, despite government directives to keep them open. Officers have also beaten journalists, accusing them of violating lockdown rules even though government directives explicitly allow journalists to work.

Westerners have been evicted from hotels across the country, and some European embassies have reported that a few of their citizens have been assaulted; many Indians believe that Westerners carry the virus.

That belief is not entirely unfounded. So far, most of India’s cases have come from foreign travelers or Indians returning from overseas. Community transmission has remained low or nonexistent, Indian officials have said.

Before India shut down international flights over the weekend, Indians landing back at home described utter chaos. Huge crowds were pushing and shoving and passengers were squeezed together in jammed arrival halls. People stood for hours with little food or water.

Aaliyah Khan, a researcher at a military research organization, arrived at New Delhi’s international airport on Saturday afternoon and was shuffled around by health and immigration authorities for more than 30 hours before being admitted to a government quarantine center 50 miles away.