The derailed train in Yilan County, Taiwan, on Sunday.
Beijing, China CNN  — 

Taiwan authorities are investigating what caused a train carrying 366 passengers to derail Sunday in Yilan County, northeastern Taiwan, killing at least 18 people and injuring 178.

The train was traveling between the cities of Shulin and Taitung when it left the tracks on a coastal line popular with tourists just before 5 p.m. local time, according to the transport ministry.

Investigators in Taiwan are examining the cause of the crash.

All eight train carriages derailed in the incident, with five of those overturning.

Among the dead are eight people from the same family who were traveling back from a wedding in New Taipei city, according to CNN affiliate in Taiwan SET TV.

The cause of the derailment is still under investigation, but at a news conference Monday transport ministry officials said they were looking into speed as a possible factor, as well as a report filed by the driver 20 minutes before the incident that said the air pressure in the train’s brakes was “too low.”

Lai Sui-chin, vice chairman of the transport ministry’s electrical engineering department, said that it appeared that pressure in the brakes was unstable before the derailment. He said there wouldn’t be enough power to brake the train if the air pressure was too low.

Lai cautioned that further investigation was needed to determine whether this caused the accident.

The train entered service at the end of 2011 and had just finished major maintenance work, according to the head of the Taiwan Railways Administration, Lu Chieh-shen.

Rescue workers attend the scene after the Puyuma Express train derailed near Xima station in Taiwan's northeastern Yilan county on October 21, 2018.

One passenger, who spoke to SET TV from the hospital, said the train “kept shaking” and “all the chairs were displaced.”

The passenger, who only gave her surname as Leong, said the train had stopped multiple times during the journey. “I felt the speed was very high, and then the train derailed,” she said.

Another passenger told SET TV that he could hear people screaming before the train came off the tracks. “Many people were crushed after the train overturned,” said the man, identified as Huang.

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

Taiwan’s President, Tsai Ing-wen, visited Yilan Monday to meet family members of passengers killed in the accident. She issued statements on social media Sunday night, saying that she was “deeply saddened” by the “major tragedy.”

“I mourn and offer condolences to the families of those who died, and wish that those injured can quickly get well,” she said in a Facebook post. “Let us give support together to those who are providing disaster relief on the front line.”

Tsai added that she has directed government agencies and the military to step up rescue efforts and determine the cause of the derailment “so as to avoid unnecessary speculation or misunderstandings.”

Yong Xiong reported from Beijing; Sheena McKenzie wrote in London; and Eric Cheung reported from Hong Kong