Residents were forced to leave their homes and an 800-metre exclusion zone was set up after a large diesel train caught fire in south Wales.
Police were called to the fire in Llangennech, near Llanelli, at 11.20pm on Wednesday with the Mid and West Wales Fire Service reporting three cars were ablaze.
Officers declared a major incident and knocked on houses in the exclusion zone asking people to move to the nearby Bryn School and Llangennech Community Centre.
People were allowed to return to their homes after 5am on Thursday.
Superintendent Ross Evans said: “This is an ongoing major incident, which no doubt caused a significant amount of disruption for those evacuated in the middle of the night.
“The safety of people living in the area was our immediate priority, and an evacuation zone was put in place to minimise the risk of harm.
“I would like to thank residents for their response; our frontline officers who swiftly moved hundreds of residents to the reception centres; as well as our emergency services and local authority colleagues.”