A landslide following torrential rains buried part of the tracks at a dark junction during a heavy downpour and the train's brakes could not stop it from hitting the mud.
The train derailed late yesterday in Tasikmalaya, a district on Java island, killing two men and a female train attendant, said Junerfin, a spokesman for the Indonesian Railway Company who like many Indonesians uses only one name.
Seven others were hospitalised, including two in critical condition, he said.
Train accidents are common in Indonesia's ageing railway network and poor infrastructure.