An express train derailed in a tunnel in Hualien County in eastern Taiwan on Friday, leaving 50 people dead and 146 others injured, fire and emergency authorities said, with the death toll revised down from 51.

A French man was among those who died and two Japanese were included in those injured in Taiwan's worst train derailment in decades, the authorities said.

People evacuate from a train that derailed in Hualien County in eastern Taiwan on April 2, 2021. (Central News Agency/Kyodo)

Related coverage:

Taiwan seeks compensation from Japanese firm over deadly derailment

Train service partially resumed after derailment kills 18 in Taiwan

18 dead, 170 injured in train derailment in northeast Taiwan

All the surviving passengers who were trapped inside the partially derailed train were rescued, they said.

The eight-car train had about 488 passengers and three crew members on board, and the rear five cars were severely damaged.

The Taiwan Railway Administration suggested in its preliminary report that the accident might be due to human error.

It said the driver of a construction vehicle parked on a slope near the opening of the tunnel might have been forgotten to engage the emergency brake, causing the truck to roll down and hit the train when it was passing.

Prosecutors are questioning the truck driver.

The media showed footage of passengers escaping from the train in the Chingshui Tunnel.

Railway authorities said the train was traveling from Shulin, an inner city district in southwestern New Taipei City, to Taitung on the southeast coast.

President Tsai Ing-wen, who plans to visit Hualien on Saturday, instructed relevant government agencies to do their utmost in rescue efforts and vowed a "rigorous investigation" into the cause of the accident.

Photo shows rescue workers at the site of the deadly derailment of an express train in Hualien County in eastern Taiwan on April 2, 2021. (Kyodo) ==Kyodo

Premier Su Tseng-chang visited the crash site and hospitals in Hualien on Friday and apologized on behalf of the government for what happened.

"I want to express my deep sympathies to the victims' families and to the passengers who were injured," he told a press conference in Taipei before his departure.

The Interior Ministry said Taiwan's flag will be flown at half staff for three days starting Saturday.

The Chinese government on Friday extended condolences to families of the victims of the train accident.

Ma Xiaoguang, a spokesman for the Taiwan Affairs Office of China's State Council, said that the mainland has been monitoring the rescue operation "with a strong concern."

Japanese Prime Minister Yoshihide Suga also offered his condolences, writing on Twitter, "I am extremely heartbroken."

"If there is a request from the Taiwan side regarding support, we want to consider possible assistance," Chief Cabinet Secretary Katsunobu Kato, Japan's top government spokesman, told a press conference.

The derailed express train was manufactured by Hitachi Ltd. and started operations in May 2007 as Taiwan's first tilting rail car, the major Japanese conglomerate said.

Under its push for infrastructure exports, Hitachi has delivered 260 rail cars, including those for express and bullet services, to Taiwan since 1960, including 64 tilting cars since 2006.

Friday marked the first day of the Chingming tomb-sweeping festival, a four-day holiday period dedicated to offering prayers to ancestors.

In October 2018, an express train in northeastern Taiwan derailed and crashed, killing 18 people.

Rescue workers head to the scene of the deadly derailment of an express train in a tunnel in Hualien County in eastern Taiwan on April 2, 2021. (Kyodo) ==Kyodo