An order was lifted on Saturday to confine around 160,000 people in Spain's northeastern Catalonia region after a fire at an industrial estate caused a toxic cloud of chlorine over a wide area, the regional government said.
The blaze at a swimming pool cleaning products company started at 2:20 am (0020 GMT) in Vilanova i la Geltru, a town 48 km south of Barcelona and caused a huge plume of chlorine smoke over the area.
Authorities had told people in the affected zone to stay at home, but hours later lifted the order.
"If you are in the zone that is affected, do not leave your home or your place of work," the Civil Protection service had said on social media site X.
No one has been hurt in the fire, Catalan emergency services said on Saturday, but residents in five towns were sent a message on their mobile phones telling them to remain inside.
"It is very difficult for chlorine to catch fire, but when it does so it is very hard to put it out," the owner of the industrial property, Jorge Vinuales Alonso, told local radio station Rac1.
He said the cause of the fire might have been a lithium battery.
Trains which were due to pass through the area were held up, roads were blocked and other events were cancelled.
The fire was under control, Civil Protection spokesperson Joan Ramon Cabello told the TVE television channel.

Palestinian teen shot dead in Israeli West Bank raid, Wafa reports
Libya says 17 migrants perish at sea, nine missing feared dead
Israel begins intercepting Gaza aid ships far from shores, army radio says
Trump urges Iran to sign a deal and discusses prolonged blockade
Seven people die in hospital wall collapse in southern India