A passenger train travelling to Indonesia's capital, Jakarta, hit the back of a stationary train early Saturday, killing at least 13 people and injuring more than 26 others, investigators said.

The crew of the train that had stopped on the track made calls to the other train to stop, but it only slowed when the first train came into view, a railway official said.

Still, the braking action may have saved some lives as the number of people on both trains totalled more the than 900.

Workers remove bodies from the scene of the crash. (AP photo)
Workers remove bodies from the scene of the crash. (AP photo)

The accident happened just after 2 a.m. local time at Gubuk station in the town of Purwodadi in Central Java province. Both trains were bound for Surabaya, the East Java provincial capital.

One of the train engineers was among the dead.

with files from the Australian Broadcasting Corporation