Seven people were forced to leave their homes in Huddersfield overnight amid fears of an explosion during a fire at a neighbouring furniture factory.
Three cottages adjoining the factory in Woodend Road, Armitage Bridge, were evacuated after firefighters found acetylene and oxygen gas cylinders.
Fire crews spent four hours tackling the blaze on Tuesday night and stopped it spreading to the nearby houses.
Residents will not be allowed back until Thursday when the gas has cooled.
West Yorkshire Police urged motorists to avoid the area as roads around the site had been closed and diversions were in place.
Paul Mace, watch manager at Huddersfield fire station, said: "As we arrived it looked as if we had a fire involving a row of cottages.
"Then we realised it was a small furniture factory behind them which adjoins two of the cottages.
"There was every possibility of the fire spreading into the cottages but we managed to prevent that.
"We then discovered an acetylene cylinder inside and we pulled everybody back and the police got the people out of the houses."