India has launched an investigation into a train crash in which 23 people were killed and at least 123 others injured, the country's fourth major rail accident over the past year.

Neeraj Sharma, a spokesman for Northern Railways, said on Sunday that the cause of the derailment, about 130km north of the capital New Delhi Uttar Pradesh state, was not known.

At least 13 coaches of the train came off the tracks as it was heading to the Hindu holy city of Haridwar.

Rescuers using cutting torches and cranes worked through the night to pull apart the toppled coaches. The injured have been taken to hospital.

Sharma said rescue operations had ended and the death toll could rise.

READ MORE: Dozens killed after train derails in southern India

Witnesses described hearing a "sound like a bomb blast" as the coaches went off the tracks.

Mahesh Chandra Sharma, a passenger on board the train, told the Indian Express: "We are lucky to be alive".

'Strict Action'

A senior official in the Uttar Pradesh government, Arvind Kumar, told the Hindustan Times the train driver had slammed on the brakes after spotting maintenance work on the tracks that had not been properly signalled.

Indian Prime Minister Narendra Modi said on Twitter he was pained by the accident, offered condolences to families of those killed and wished a speedy recovery to the injured.

The government pledged compensation of $5,500 for the kin of deceased passengers.

Railway Minister Suresh Prabhu in a Twitter post said, "strict action would be taken against any lapse".

Train crashes are all too common in India after decades of poor investment and rising demand.

The state-run system operates 9,000 passenger trains and carries some 23 million passengers every day.

Saturday's accident was the fourth major accident this year and the third in Uttar Pradesh in 2017. More than 250 people were killed across the country in train accidents in 2015 and 2016.

In November, a crash in Uttar Pradesh killed 150 people.

In June, Reuters reported that a planned $15bn safety overhaul of India's rail network faced delays as the state steel company could not meet demand for new rails.

The network is in the middle of a $130bn, five-year modernisation.

The government launched the additional safety overhaul programme in February to tackle a surge in train accidents in the past two years blamed on defective tracks.