A passenger train has crashed and exploded into flames killing an estimated 30 people, mostly women, after crashing into a gas truck in south Jakarta.

The Serpong to Tanah Abang train was passing through the southern suburb of Bintaro at about 11.30am local time (5.30pm NZT) when it hit the liquefied gas truck and burst into flames.

Witnesses said the truck had failed to stop at the level crossing, despite warning bells.

The front carriage of the passenger train, which is reserved for women only to protect them from sexual harassment, bore the brunt of the crash.

A fireball immediately engulfed the carriage as flames burst 20m into the air. It was still in flames 90 minutes later.

Seven people have been confirmed dead, two of them women. A male passenger, who managed to escape the wreck, said the automatic doors on the train could not be opened and that panicked passengers had run to the rear of the carriages, away from the fire.