Wearing masks is being made compulsory in Spain both indoors and out in public if social distancing is not possible.
Only children under six and people with health issues are exempt from the law, which comes into force on Thursday.
Many European countries have now made wearing masks a requirement on public transport but the Spanish decree goes further.
Spain has seen one of the worst Covid-19 outbreaks in Europe but is now easing the lockdown gradually.
It already requires the wearing of masks on public transport and is now strengthening the rules across the population. Spain has reported almost 28,000 deaths and 232,000 infections since March but the rate of infection has declined.
Spain had imposed some of the toughest measures on the continent, including keeping children indoors for six weeks. Prime Minister Pedro Sánchez addressed parliament on Wednesday ahead of a vote on extending the state of alert for two more weeks.
What does the law say?
The decree states: "Using masks will be compulsory on the street, in open spaces and any closed place of public use, when it is not possible to maintain a safe distance of at least two metres (6.5ft)."
While children under six are not required to wear masks, all between the ages of three and five are recommended to wear them. According to El País, that means 45 million people will now have to wear a mask and another 1.3 million will be urged to.
The law underlines that it is following World Health Organization recommendations to minimise infection in closed and public places where there is a large concentration of people.
It says wearing masks is justified as it blocks the transmission of infected droplets in areas where safe distances cannot be guaranteed.
You are exempt if you have a respiratory illness or another health issue or disability that makes wearing a mask impossible.
In other words, people with asthma, allergies or forms of anxiety will not be liable. No penalties for breaking the law are mentioned and there is no specific type of mask detailed other than that it should cover both nose and mouth.
Are face masks useful?
By Philippa Roxby, health reporter, BBC News
Face masks or coverings are most useful to stop the person wearing them spreading the virus, particularly if they have any symptoms but also if they don't.
That's why many countries are now recommending people wear them on public transport and in shops, for example, where they can't stay 2m away from other people.
But they are by no means fool-proof - if you touch them, if you wear them wrongly and if they are loose around the edges they can become contaminated. And they are not a replacement for washing hands frequently and social distancing.
They are also not thought to be as relevant when people are outdoors.
The World Health Organization says only two groups of people should wear masks - those who are unwell with symptoms and those caring for people suspected to have the virus. It also says medical masks - which are usually much tighter and better made - should be kept for healthcare workers, who are most in need.
What do other countries say?
There is a wide array of measures across Europe:
- Most parts of Germany, Austria, Slovakia and the Czech Republic say masks should be worn in shops and on public transport
- Slovakia and the Czech Republic are extending that rule to include offices too
- Italy says masks should be worn in shops and on transport but in public too where it is hard to maintain a safe distance
- The UK, Switzerland and Belgium recommend the wearing of masks: face coverings are being advised for people in Scotland and England in certain enclosed spaces
- Greece says masks should be worn in shops, on transport, in enclosed spaces and by tour guides