Indians crowded grocery stores and pharmacies on Wednesday in a struggle for essential items after Prime Minister Narendra Modi ordered a total lockdown for three weeks to fight the coronavirus pandemic, one of the toughest such measures worldwide.

India's tally of 536 cases and 10 deaths is dwarfed by China, Italy and Spain, but Modi and health experts have warned that the nation of 1.3 billion people faces a tidal wave of infections if harsh steps are not taken.

More:

People in the key cities of New Delhi, Mumbai and Bengaluru rushed to stock up after Modi decreed the shutdown in a speech televised nationwide, barely four hours before it took effect.

Everything, except for essential services like supermarkets, was shuttered.

People buy vegetables at a market after Modi called for a nationwide lockdown [Anushree Fadnavis/Reuters]

As states shut their borders, long queues of trucks carrying milk, fruits and vegetables snaked down highways, even though Modi said essential services would be maintained countrywide.

"There are no clear instructions, police are telling us to close down the shop," said Ram Agarwal, a grocer in New Delhi swamped by people looking to buy dry food supplies and milk.

Al Jazeera's Elizabeth Puranam, reporting from New Delhi, said Wednesday morning was quieter after panic buying immediately after Modi's address on Tuesday night.

"Delhi Chief Minister Arvind Kejriwal in a news conference said that people crowding to buy essential commodities defeated the purpose of the lockdown," she said.

Normally bustling railway stations in New Delhi were deserted. "Delhi looks like a ghost town," said Nishank Gupta, a lawyer. "I have never seen the city so quiet before."

The government said on Wednesday that it is banning the export of hydroxychloroquine and formulations made from the medication, as experts test the efficacy of the drug in helping treat patients infected with COVID-19.

Hydroxychloroquine, a malaria drug, is among the medications that are being tested, as a potential treatment for patients with the disease.

People crowd a vegetable market in Mumbai [ Rafiq Maqbool/ AP Photo]

India has already banned the export of all ventilators and sanitisers and personal protective equipment such as masks and clothing to contain the outbreak.

Disruptions to online services added to people's woes. Walmart Inc's Flipkart has suspended services, the Indian e-commerce firm said in a notice on its website as the lockdown began. Amazon India's pantry service, which delivers groceries, was also not available in several cities.

Anthony Thomas, a worker at a small online milk delivery service, who normally distributes 150 litres (5,072 fluid ounces) of milk and groceries in New Delhi each morning, said his employer had told him to stay home.

"There is no information yet on tomorrow's supplies," he added.

Modi's sweeping action aims to rein in the spread of the virus in India's many small towns after a first wave of infections in New Delhi, the capital, the commercial hub of Mumbai, and other big cities.

Cases reported from the remote parts of the western state of Maharashtra have fuelled concerns about the ability of the public health system, notoriously starved of resources, to cope.

People stand in marked positions to buy essential commodities from a grocery store in Mumbai [ Rafiq Maqbool/ AP Photo]

India has just 0.5 hospital beds for every 1,000 people, compared with 4.3 in China and 3.2 in Italy.

Nobody in the world's biggest democracy will be allowed to leave home for the next three weeks, Modi said.

"Every district, every lane, every village will be under lockdown," he said, warning that India's development would be set back decades if it did not shut down to fight the virus.

But shutting down a $2.9 trillion economy would cause widespread damage and especially hurt the poorest people, some experts said.

"The need of the hour is an economic package," said Madhura Swaminathan, head of the economic analysis unit of the Indian Statistical Institute in the technology hub of Bengaluru.

"Asking people to stay at home is necessary, but that won't be enough for the majority of the population who cannot afford to sit at home without work and pay."

Authorities are scrambling to throw up defences against the virus across South Asia, home to a quarter of the world's population.