Four people were killed and at least 22 injured when two trains carrying hundreds of passengers collided in Indonesia on Friday, officials said.

The front carriages of both trains were a mangled wreck while others further back had derailed and overturned on a stretch of tracks cutting through rice fields in West Java province.

No fatalities have been reported among the nearly 500 passengers on board, with all four deaths reported so far involving train crew.

The crash between an intra-city train carrying 287 passengers and a local line with 191 on board took place at 6:03 am local time (1103 GMT) near Cicalengka, railway operator PT KAI said.

"KAI is deeply saddened and expresses its condolences for the death of four train officers, who were train driver, assistant, steward and security guard," said a spokesman for the company.

The number of injuries reported have varied. Police have put the number at 37 while the railway operator said 22 people were injured.

Police spokesperson Ibrahim Tompo said all passengers have been evacuated with those injured taken to local hospitals.

But he said that a joint rescue team was still working to recover the body of one train crew member killed in the crash.

Cause unknown

The cause of the accident is not yet known.

The Transportation Ministry has deployed teams to assist with the evacuation and conduct an investigation into the accident.

"We also apologise for this accident which has disrupted railway services, especially in West Java," said ministry spokesperson Adita Irawati.