At least 50 people were killed in Taiwan on Friday when a packed train collided with a vehicle on the tracks and then derailed inside a tunnel, in the island's worst railway accident in decades.

Officials said the devastating collision was caused by a railway maintenance vehicle that slipped down an embankment above the tracks near the eastern coastal city of Hualien.

Map of Taiwan, locating deadly train derailment on Friday.
Map of Taiwan, locating deadly train derailment on Friday. AFP / STAFF

"(The driver) was suspected of not pulling the parking brake tight enough so the vehicle slid 20 metres... onto the train line," Feng Hui-sheng, deputy director of Taiwan Railways Authority, told reporters.

Local media images from the scene showed the back of a yellow flatbed truck on its side next to the train just a few metres from the tunnel entrance.

The eight-carriage train was packed with some 480 people heading down the east coast for the annual Tomb Sweeping Festival, a four-day public holiday.

Officials said the accident could have been caused by a maintenance vehicle sliding down an embankment and striking the train before it entered the tunnel near the coastal city of Hualien
Officials said the accident could have been caused by a maintenance vehicle sliding down an embankment and striking the train before it entered the tunnel near the coastal city of Hualien Central Emergency Operation Center / Handout

The Taiwan Railways Agency said 146 passengers were sent to hospital in addition to the 50 confirmed dead.

A French national was among those killed while two Japanese and one Macau resident were injured. A previous statement from the agency gave a death toll of 51.

Dozens of people were thought to be trapped in carriages inside the tunnel
Dozens of people were thought to be trapped in carriages inside the tunnel Central Emergency Operation Center / Handout

One unnamed female survivor told TVBS news channel of trapped passengers -- some crying out for help, others unconscious.

"There were many people pressed under the seats and others on top of those seats too," she said.

President Tsai Ing-wen visited an emergency response centre in the capital Taipei, and said investigators would get to the bottom of how such a deadly crash could have occurred.

Dozens of people are feared dead after a packed train derailed inside a tunnel in eastern Taiwan on Friday at the start of a long holiday weekend, with rescuers still scrambling to reach others trapped inside.
Dozens of people are feared dead after a packed train derailed inside a tunnel in eastern Taiwan on Friday at the start of a long holiday weekend, with rescuers still scrambling to reach others trapped inside. Taiwan Railway Authority

"We will definitely clarify the cause of the incident that has caused major casualties," she told reporters.

"I hope the deceased can rest in peace and the wounded can recover soon."

Friday's crash looks set to be one of Taiwan's worst railway accidents on record
Friday's crash looks set to be one of Taiwan's worst railway accidents on record TAIWAN RED CROSS / Handout

The accident occurred on Taiwan's eastern railway line around 9:30 am (0130 GMT).

Map showing the location of deadly train derailment in eastern Taiwan on Friday.
Map showing the location of deadly train derailment in eastern Taiwan on Friday. AFP / Laurence CHU

Pictures published by local newspaper UDN showed the front of the train inside the tunnel had been pulverised into a twisted mesh of metal.

Rescuers worked for hours to reach those trapped inside the tunnel and haul them out, using buzzsaws to slice through warped sheets of metal.

Footage released by the Taiwan Red Cross showed specialists with helmets and headlights had to use the roof of the stricken train to reach people inside the narrow single-track tunnel.

An aerial view shows rescuers working near the site in eastern Taiwan where a train derailed
An aerial view shows rescuers working near the site in eastern Taiwan where a train derailed AFP / Sam Yeh

By mid-afternoon, officials said there were no people left inside the carriages but dozens of rescuers remained on site as evening set in, according to AFP reporters at the crash scene.

Due to a long history of deadly earthquakes, Taiwan has experienced rescue teams on permanent standby to deal with disasters and retrieve trapped people.

People further back in the train were able to walk away from the crash comparatively unscathed.

A live Facebook broadcast by UDN outside the tunnel showed a row of undamaged train carriages with rescuers helping passengers escape.

"It felt like there was a sudden violent jolt and I found myself falling to the floor," an unidentified female survivor told the network, saying she suffered a cut to her head.

"We broke the window to climb to the roof of the train to get out."

The annual Tomb Sweeping Festival is an especially busy time of the year for Taiwan's roads and railways.

During the festival, people return to ancestral villages to tidy up the graves of their relatives and make offerings.

Taiwan's eastern railway line is usually a popular tourist draw down its dramatic and less populated eastern coastline.

With the help of multiple tunnels and bridges, it winds its way through towering mountains and dramatic gorges before entering the picturesque Huadong Valley.

Friday's crash looks set to be one of Taiwan's worst railway accidents on record.

The last major train derailment in Taiwan was in 2018 and left 18 people dead at the southern end of the same line.

Thirty were also killed in 1981 after a truck collided with a passenger train at a level crossing and sent coaches over a bridge in Hsinchu.

The Apple Daily newspaper said the island's worst crash was in 1948 when 64 died.

Another crash in 1961 killed 48, while a 1978 crash left 41 dead.