TAIPEI, Taiwan — At least 18 people were killed and 171 others injured after a passenger train derailed Sunday afternoon in northeastern Taiwan on a coastal route popular among tourists, railroad officials and local news reports said.

The Puyuma Express train was carrying 366 passengers to Taitung, a city on Taiwan’s southeast coast, from Shulin in New Taipei City in the north when it went off the tracks near Xinma Station in Yilan County about 4:50 p.m. local time.

Images on social media showed the mangled wreckage of the train carriages in a zigzag pattern near the tracks, and injured passengers lying on the ground. Five of the eight carriages were reported to have overturned.

Some passengers were crushed to death, a spokesman for the Ministry of National Defense, Chen Chung-chi, said, according to The Associated Press. “Their train car turned over. They were crushed, so they died right away,” he said.

About 120 soldiers were called to the site to help remove bodies so that they could be identified, he added, but nightfall was complicating rescue work.