The incident occurred about half a kilometre away from the Semarkheri railway station.
"The fire has been extinguished, and the reason for the fire will be investigated. For now, a major accident has been averted," Railway Officer Naval Aggarwal said.