Media playback is unsupported on your device Media caption The Puyuma Express 6432 service came off the tracks close to Xinma station

The driver of the train that crashed in Taiwan on Sunday killing 18 people has said he turned off its speed-control system before the accident.

He told a court he had disabled the system after earlier in the day it had slowed down the train because of a fault.

Prosecutors accuse the driver of negligence for failing to switch the system back on.

The deadly crash is the territory's worst rail accident in 27 years.

A total of 366 passengers were on the train when all eight of its carriages derailed. At least three children are among the dead.

The train came off the rails while moving at almost 140km/h (87mph), nearly twice the speed limit imposed due to a curve in the track, officials said.

Prosecutors questioned the injured driver on Tuesday before he was returned to hospital.

Suspected 'negligence'

Image copyright AFP Image caption Sunday's crash was Taiwan's worst rail disaster in decades

According to officials, the driver said he had switched off the speed control system after a failure slowed down the train earlier in the journey.

"He should have turned the system back on at the next stop," court spokesman Huang Yong-sheng said according to Reuters news agency.

"The defendant is highly suspected to have been negligent."

Image copyright AFP Image caption Authorities say five of the train's eight carriages ended up on their side

The Puyuma Express 6432 service derailed close to Xinma station, near the town of Su'ao, about 70km from the territory's capital Taipei.

The driver "did not have the assistance of automatic speed monitoring and braking and should have taken necessary reactive measures, knowing there was a big curve ahead, instead of hitting the brake near the platform that led to the derailment", Yilan district court was quoted as saying by AFP news agency.

Video of the crash site on local television shows passengers breaking windows to escape the carriages.

Photographs from the scene show seats upended, with parts of the railway tracks twisted through carriage windows.

The island has an extensive train network and more than half a million passengers travel on the system every day.