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."

Read More