India railway budget
The train stopped at a junction for its scheduled engine swap, and a diesel engine replaced the electric one - Representational image Shailesh Andrade/Reuters

In a bizarre incident, an electric train engine travelled nearly 13km without a driver before a staffer managed to stop it by chasing after it on a bike. And it definitely wasn't one of those self-driving trains!

The incident happened in the south Indian state of Karnataka on Wednesday, 8 November, at around 3pm local time (9.30am GMT) after the Chennai-to-Mumbai train arrived at Wadi junction in Kalaburagi district. The train stopped at the junction for its scheduled engine swap, and a diesel engine replaced the electric one, the Deccan Chronicle reported.

After the swap, the train went on to continue its journey, leaving the electric engine behind.

But that's when things started to go horribly wrong.

In what is being described by railway officials as a "slip-up", the electric engine reportedly got disengaged after the loco pilot stepped out and started to move on its own.

The authorities were informed soon enough, and they managed to alert the next few stations to clear signals and tracks to prevent any possible mishap. Trains coming from the opposite direction were also halted.

However, the 'runaway' train engine was still chugging along on its own.

In dramatic scenes, almost like an action movie sequence, a courageous railway staffer gave chase to it on a motorbike and, after a 20-minute pursuit, managed to board it and eventually bring it to a stop.

No injuries were reported but an investigation has been launched to find out how the engine started to move on its own.

Incredibly enough, this is not the first time that a train in India has made its way without a driver. In July, a suburban train in the state of Tamil Nadu "moved on its own" for 500 metres and then got derailed, according to a report in The Times of India.

Authorities said the train was parked in a yard at a railway junction when it suddenly started moving. But it eventually got derailed due to a gap in the tracks.