Around 20 people were evacuated from their homes in Batley following a gas leak.
Firefighters were called out to a rubbish fire in Grafton Street last night (Wednesday), where they found the fire had also damaged a gas pipe.
Residents from 10 houses were evacuated as a precaution around 11.15pm.
They were moved to safety until gas engineers could make the area safe.
A fire service spokesman said no one was injured and residents returned to their homes after a couple of hours.
Police are now investigating the cause of the incident.