LUCKNOW, India -- Six coaches of a passenger train derailed in northern India on Saturday, killing 23 people and leaving at least 81 others wounded, officials said.

Two of the coaches telescoped into each other, while four others toppled over after going off the track, said Arvind Kumar, a top official in Uttar Pradesh, the state where the derailment occurred.

Neeraj Sharma, a railway spokesman, said the incident took place near the small town of Khatauli.

A volunteer breaks the glass of a train compartment window to rescue passengers trapped after an accident near Khatauli, in the northern Indian state of Uttar Pradesh, Saturday, Aug. 19, 2017. AP

The cause of the derailment was not immediately known, Sharma said.

Get Breaking News Delivered to Your Inbox

Railway police and local volunteers helped pull passengers out of the upturned coaches of the Kalinga-Utkal Express, which connects the Hindu holy city of Haridwar with the temple town of Puri, in the eastern state of Orissa.

"We are struggling to pull out injured, and are waiting for gas cutters to arrive. It's too dark to launch a full-fledged search operation, but our teams are trying their best," senior police officer Ajay Pandey told Reuters news agency.

Indian Prime Minister Narendra Modi said on Twitter that he was pained by the derailment and offered condolences to families of the victims.

Extremely pained by the derailment of the Utkal Express in Muzaffarnagar. My thoughts are with the families of the deceased: PM — PMO India (@PMOIndia) August 19, 2017

I wish those injured a speedy recovery. The situation is being monitored very closely by the Railways Ministry: PM @narendramodi — PMO India (@PMOIndia) August 19, 2017

Reuters reported in June, citing two government documents, that a planned $15 billion safety overhaul of India's ageing rail network faced delays as the state steel company was unable to meet demands for new rails.