Under the decree being finalised, people would be allowed out only for emergencies, to buy food, or for work.
With 191 deaths and 6,046 infections, Spain is the worst-hit country in Europe after Italy, which declared a nationwide lockdown on Monday.
The US is extending its European travel ban to the UK and the Republic of Ireland from Monday.
President Donald Trump confirmed the news in answer to a reporter's question at the White House.
On Friday, the World Health Organization (WHO) said Europe was now the "epicentre" of the pandemic.