An underground gas main at Milesmark roads department depot in Dunfermline, Fife, was ruptured by a digger at around 1.40pm.
Staff raised the alarm and pipeline operators Scotland Gas Networks were at the site on Carnock Road this afternoon sealing the leak.
A 500-metre exclusion zone was set up which covered around seven streets in the Rumblingwell area.
Residents gathered at Baldridgeburn Community Centre while the work was carried out.
A Fife Police spokesman said: "The wind is blowing the gas towards the houses so we are taking every precaution we can."
The council depot is used to store lorries, fuel and grit among other things.
No staff or residents were injured in the incident.
A spokeswoman for Scotland Gas Networks, formerly Transco, said: "It looks as if a digger has damaged a medium-pressure gas pipe.
"There was a fair amount of blowing but it is very much under control. There are no safety concerns."
The A907 was closed between the traffic lights at William St/Carnock Road
up to Craigluscar Road.