• His announcement came after several Indian states introduced measures of their own, such as travel restrictions and the closure of non-essential services.
• India has already issued a ban on international arrivals and grounded domestic flights. The country's rail network has also suspended most passenger services
• Many parts of India, including cities such as Delhi and Mumbai, are already under tight restrictions. But this move extends those provisions to every corner of the country.
India's Prime Minister Narendra Modi has imposed a nationwide lockdown in an attempt to slow the spread of the coronavirus.
The restrictions came into force at midnight local time (18:30 GMT) and will be enforced for 21 days.
"There will be a total ban on venturing out of your homes," Mr Modi said in a televised address.
He appealed for people not to panic - but crowds quickly mobbed stores in the capital, Delhi, and other cities
Correspondents say it is not clear how - or even if - people will now be allowed out to buy food and other essentials.
The new measures follow a sharp increase in cases in recent days. There have been 519 confirmed cases across India and 10 reported deaths.
India - which has a population of 1.3bn - joins a growing list of countries that have imposed similar measures.
Nearly 400,000 people have tested positive for the virus worldwide, and around 17,000 have died.
"The entire country will be in lockdown, total lockdown," Mr Modi said on Tuesday.
He added: "To save India, to save its every citizen, you, your family... every street, every neighbourhood is being put under lockdown."
Mr Modi warned that if India does not "handle these 21 days well, then our country... will go backwards by 21 years".
"This is a curfew," he said. "We will have to pay the economic cost of this but [it] is the responsibility of everyone."
Mr Modi later warned that panic-buying would only spread the disease. He said the government would ensure supplies.
But in Delhi and the financial capital, Mumbai, people fearing shortages quickly thronged shops and pharmacies.
"I have never witnessed such a chaos in my life," the owner of one store in the Shakarpur district of Delhi said, quoted by the Press Trust of India.
"All our stocks, including rice, flour, bread, biscuits, edible oils, have been sold out."