Video footage broadcast by MetroTV and Kompas TV news channels showed some train carriages had derailed completely while passengers were being helped out of others. Ambulances were at the scene to take the injured to the nearest hospitals, police said.

Two of the victims were the train's operators, said the transport ministry's director general for trains Mohamad Risal Wasal.

It was not immediately clear what caused the crash or how many people were on board the trains. All passengers had been evacuated, authorities said.

(Reporting by Ananda Teresia and Stefanno Sulaiman, Editing by Kanupriya Kapoor)