The text, which provides legal cover, says the restrictions can be applied “exceptionally and when there are extraordinary circumstances or force majeure that justify it”.
The move came as empty shelves appeared in many supermarkets due to the combined effect of a truck drivers’ strike and the Ukraine war.
Most of the empty shelves have been due to an ongoing lorry drivers’ strike over soaring diesel prices, which began on March 14 and has curbed supplies of milk, flour, rice and other basic goods.
Three weeks ago, Spanish supermarkets began rationing the sale of sunflower oil to stop customers from stockpiling over shortage fears due to Russia’s invasion of key supplier Ukraine.
The text was introduced as part of the government’s emergency plan to address the economic impacts of the war.
“It provides legal certainty so they can limit the number of articles purchased and thus avoid hoarding but mostly so that there is enough for all consumers,” Reyes Maroto, minister for industry, commerce and tourism, told reporters.
“We are also responding to a need that distribution companies have flagged to us which has become apparent due to the transport strike.”
Spain has been struggling with a wave of social unrest over runaway inflation and rising prices, with lorry drivers striking, production stoppages and mass protests by farmers and fishermen.
Soaring energy prices have also driven Spain’s inflation rate to a 37-year high, jumping to 9.8 percent in March up from 7.6 percent in February.
Earlier this week, the government unveiled plans to offer €16 billion ($17.5 billion) in direct aid and loans for families and companies hit by the impact of Russia’s invasion of Ukraine.