Eighteen people have died and 175 have been injured after a train derailed in northeastern Taiwan, authorities said.

It is the island's worst rail disaster in more than three decades.

Four carriages overturned in the crash, which occurred in Yilan County near the coast on a line popular among tourists when all eight cars ran off the tracks on a bend near a station, officials said.

It was unclear what caused the crash.

As of this afternoon, all 366 passengers onboard, including the dead and injured, had been evacuated or removed from the wreckage, the Taiwan Railways Administration said.

Hundreds of rescuers and military personnel worked through the wreckage with spotlights in search of survivors, with ambulances stationed nearby.

Rescue workers, some attending to injured people at the scene, used cranes to lift the battered cars, some of which were lined in a zigzag pattern near the tracks.

Some rescuers climbed onto the top of an overturned carriage which had hit a pole carrying electricity.

The official Central News Agency said the incident was the island's deadliest rail tragedy since 30 were killed in a 1981c ollision in northern Taiwan.

Several passengers, who appeared to be suffering from minor injuries, were carried out from a deformed car by local villagers before rescuers arrived, one video showed.

"We will use all our strength and efforts for the rescue," President Tsai Ing-wen wrote on her Facebook page.

An investigation is under way to find out the cause of the crash, Taiwan Railways Administration said.

"The train was in pretty good condition," its Deputy Chief Lu Chieh-Shen told a news conference.

The authority was checking whether how many foreigners were on board, with one American injured in the incident.

The derailment came weeks ahead of island-wide local elections that are being seen as a bellwether for Tsai's ruling party's performance in presidential elections due in 2020.