Image copyright AP Image caption Bus was carrying 24 Chinese tourists and a tour guide

A suicidal driver was the cause of a bus crash in Taiwan that killed 26 people in July, investigators say.

Officials had previously believed the crash, in which an entire Chinese tour group died, was caused by mechanical failure.

But an investigation has found that the driver, Su Ming-cheng, was drunk and had been planning to kill himself.

He was already being investigated for scuffling with a tour guide and sexually assaulting an unnamed victim.

In both cases, officials alleged he was intoxicated, and prosecutors said the lawsuits had left Mr Su "depressed".

Image copyright Reuters Image caption Investigators said the driver started the fire inside the bus

Minutes before the crash, investigators said, the driver poured fuel inside the bus and started a fire with a lighter.

He then swerved into a roadside barrier on a national highway in the city of Taoyuan, killing himself, a local guide and 24 tourists who were headed to the airport.

An emergency exit was also locked, trapping people as they tried to escape.

Text messages from Mr Su's relatives showed they pleaded with him not to take his own life.

"Don't you love the three children in your family? Don't let them be ashamed. If you do this, it will bring shame to us all," a message from his sister read, according to a transcript published by Agence France-Presse.

He had been briefly suspended in May by his employer for fighting with another tour guide, officials added.

The incident led Beijing to demand Taiwan do more to ensure the safety of mainland Chinese tourists.