All Spaniards will have to stay at home under the quarantine, which comes into force on Monday morning.
With the number of coronavirus cases spiraling to more than 6,000 and the death toll reaching 190, Spain on Saturday followed Italy and imposed an unprecedented lockdown.
Spain’s left-wing government passed a two-week state of emergency order which came into action immediately on Saturday night.
Some 47 million Spaniards must stay at home in an attempt to contain an outbreak which has seen 1,500 new cases in the past 24 hours. Spain has the fifth-highest number of cases in the world, behind China, Italy, Iran and South Korea.
In practical terms, the emergency order means Spaniards will only be allowed to leave their homes to buy food, get medicines, see a doctor, leave the house for an emergency or go to work.
Already Spain has the feel of a country that has closed for business, and the atmosphere is tense.
The crackdown started last week when schools closed, confining not just 15 million pupils to home but their parents, too.