Homes were evacuated near Llanwrtyd Wells, Powys, because of a lorry tanker leaking gas.
The tanker at a depot leaked 13,500 litres of propane and firefighters used spray to suppress it.
The road to Cefn Gorwydd was closed as a precaution for most of Sunday afternoon and local train services were suspended.
A 200m (656ft) cordon was put in place while Mid and West Wales Fire and Rescue Service dealt with the incident.
The cordon extended to 500m (1,641ft) downwind of the leak until the incident was brought under control before 17:00 GMT.
A fire service spokesman reported earlier: "The lorry tanker is leaking a large quantity of gas".
The service had four appliances and police, ambulance and Network Rail staff were also in attendance.
Arriva Trains Wales put on replacement buses between Llandovery and Llandrindod Wells due to safety checks on the line at Llanwrtyd.
Trains only ran between Shrewsbury and Llandrindod and between Llandovery and Swansea, with delays of up to an hour.
The Environment Agency sent officers as a precaution to advise the fire service, but said it was being treated as a safety incident.