At least 44 people were killed and 103 injured when one Iranian passenger train collided with another at a station about 150 miles east of the capital Tehran, state media reported.
“I was sleeping when the crash happened. I thought it was an air strike ... When I opened my eyes, there was blood everywhere,” a hospitalised passenger told state television.
State television footage showed four derailed carriages, two of them on fire and a spokesman for Iran's Red Crescent, Mostafa Mortazavi, told the semi-official Fars news agency that firefighters were trying to control the blaze.
Provincial governor Mohammad Reza Khabbaz told state television that the crash took place in Semnan province on the main line between Tehran and Iran's second city Mashhad.
An express train operating from Tabriz in the northwest to Mashhad had been forced to stop between stations by a mechanical failure or because of extreme cold, Khabbaz said.
Two coaches on the express burst into flames when a passenger train behind ran into the back of it at 7:50 am.
The front four coaches of the second train — running from Semnan to Mashhad — derailed and overturned.
“The bodies of 31 dead have been identified and more than 70 people hospitalised,” Khabbaz said, indicating that the toll could rise.
Hossein Kulivand, head of Iran's emergency services, quoted by the ISNA news agency, gave a casualty toll of 35 dead and 80 injured.
Initial reports had said the express train was stopped in a station when the accident happened.
But Khabbaz said it was some four kilometres outside Haft Khan station between Semnan and Damghan, the next major town.
At midday, emergency services were still battling to put out the fire and rescue injured passengers from the overturned carriages.
The province's Red Crescent director, Hassan Shokrollahi, said the remote location of the crash site had complicated rescue efforts.
“Due to the difficulty of access, only our helicopter has managed to reach the scene,” he said. The injured were airlifted to hospitals in Semnan and Damghan.
The Tehran-to-Mashhad line was closed to allow an investigation into the cause of the crash, said Sadegh Sokri, spokesman for Iran's railways.
A collision on the same line between a freight train and a passenger train left two dead and 30 injured in June 2014.
President Hassan Rouhani called for “all technical, administrative and preventive measures to be taken to prevent the recurrence of such an accident”.
Iranian trains have been involved in four collisions this year with road vehicles, including a crash with a truck in July that left around 30 injured near the Caspian Sea in the northern province of Mazandaran. Collisions between trains have been rarer.
In the country's deadliest rail disaster, 328 people were killed when a train transporting sulphur, petrol and fertilisers exploded in northern Iran on February 18, 2004.
Iran's roads are notoriously deadly, mainly because drivers show scant regard for rules, with 16,000 lives lost in the Iranian year between March 2015 and March 2016.