TAOYUAN, Taiwan — Taiwanese prosecutors have closed their investigation into a July bus crash that killed all 26 people on board, including 23 Chinese tourists, saying the driver was suicidal and that they found no evidence of a mechanical failure, state media reported Saturday.

The July 19 crash was the deadliest single incident involving Chinese tourists since Taiwan began admitting mainland visitors in 2008. After the crash, many questioned whether the bus had been properly maintained or had safety concerns.

But authorities in the city of Taoyuan said they believed the driver had planned to kill himself, possibly due to fallout from his being investigated for sexual misconduct, Taiwan’s Central News Agency reported. Authorities have previously said the bus began to emit smoke before smashing into a highway guardrail.

Prosecutors found that the driver had purchased gasoline to pour inside the bus on the fourth day of the group’s tour, and had been “emboldened” by drinking just before the crash, the news agency reported.

Including a Chinese tour guide, 24 of the people on the bus were visiting Taiwan from China’s Liaoning province.

The crash occurred on the last day of their tour, on a major highway near Taiwan’s main international airport.

Authorities found traces of gasoline inside the bus, initially raising questions about whether there had been a leak of some kind. A safety exit on the bus was also locked, trapping people as they tried to escape the fast-burning bus.