At least seven people have died after a commuter train collided with a lorry hauling fuel in Indonesia's capital, Jakarta.

The explosion on Monday sent a fireball of orange flames and black smoke rising skyward.

The accident killed the train engineer and at least six others and injured 20 others, according to Jakarta police spokesman Colonel Rikwanto.

A burned-out passenger car was seen lying on its side while black smoke rose from parts of the engulfed train.

A company spokeswoman said the train was headed to central Jakarta when the accident occurred just before noon local time.

She said the lorry was hauling liquefied petroleum gas (LPG), but police said it was carrying petrol.

Two carriages derailed during the accident, and hundreds of panicked passengers ran from the train, many screaming and crying.

Female passengers

Al Jazeera's Step Vaessen, reporting from Jakarta, said one of the carriages that was burnt out was reserved for female passengers of the train. 

"They are always packed and it is also very, very difficult to get out of these trains," she said. "In case of accidents, the doors cannot be manually opened."

A passenger of a derailed carriage who managed to escape told a local television station that the train appeared to slam on its breaks just before impact.

She said she heard explosions and then the car filled with thick smoke, making it difficult to breathe.

"My position was near the door, but I could not move because I was ... trampled by other passengers,'' said Veronica, who uses only one name, and was riding in a car reserved for women.

"We managed to escape after people from outside broke the windows. I saw many victims with burns on their legs, hands and stomachs."

A firefighter at the scene said rescuers worked to pull out three bodies pinned under the wreckage.

The cause of the accident is being investigated.

The incident occurred near the site of a 1987 crash that killed 156 people when two trains collided.

Commuter trains are often packed with passengers due to the lack of other forms of public transportation in Jakarta, which has some of the worst traffic jams in Asia.

Source: Al Jazeera and agencies