Follow KDKA-TV: Facebook | Twitter

DONGSHAN TOWNSHIP, Taiwan (CNN/AP) — At least 22 people have been killed and 171 others injured after a train derailed in Yilan County in northeastern Taiwan, according to an update from the country’s transport ministry.

The train was traveling between the cities of Shulin and Taitung when it derailed Sunday on a coastal line reportedly popular with tourists. The train was carrying 366 passengers when the accident occurred just before 5 p.m. local time, the transport ministry said.

A 43-year-old American woman was among those injured, according to the ministry. She has been sent to a local hospital.

Most of the deaths were in the first car, and it was unclear how many people may still be trapped in the train, according to a government spokesman, who spoke on the customary condition of anonymity.

Some passengers were crushed to death, Ministry of National Defense spokesman Chen Chung-chi said.

“Their train car turned over. They were crushed, so they died right away,” Chen said.

Earlier, the government put the death toll as high as 22, but the National Fire Agency, citing the Cabinet spokesman’s office, later reduced that figure, blaming a miscalculation.

Photos from the scene just south of the city of Luodong showed the train’s cars in a zig-zag formation near the tracks. Five cars were on their sides.

Local television reports said passengers tried to escape through windows and that bystanders gathered to help them before rescuers arrived.

Hours after the accident, one of the eight cars was seen tipped over at about a 75-degree angle, with the entire right side destroyed.

Fearing people may be trapped beneath the car, firefighters with lights on their hard hats peered underneath as a crane prepared to upend it. The firefighters were joined by soldiers and Buddhist charity workers who gathered on both sides of the tracks.

Soldiers removed bodies to identify them, but nightfall complicated the rescue work.

On a live feed provided by Taiwan’s United Daily News, rescuers could be seen carrying what appeared to be a body wrapped in white plastic away from the site.

The wreck happened at a railway station called Hsin Ma, but the train was not scheduled to make a stop there.

The Puyuma was launched in 2013 to handle the rugged topography of Taiwan’s east coast. It is distinct from the high-speed rail that runs on the west coast. The Puyuma trains travel up to 150 kilometers (93 miles) per hour, faster than any other in Taiwan except for the high-speed rail.

The train that derailed had its most recent inspection and major maintenance work in 2017, Taiwan Railways Administration Director Lu Chie-shen said at a televised news conference.

(Copyright 2018 The Associated Press and CNN The Wire. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)