At least 40 people were killed and dozens injured on June 7 when a packed Pakistani inter-city train ploughed into another express that had derailed just minutes earlier, officials said.

Several people were still trapped in the mangled wreckage near Daharki, in a remote part of rural Sindh province, which took rescue workers with specialist equipment hours to reach.

The double accident happened around 3:30am (2230 GMT) when most of the 1,200 passengers aboard the two trains would have been dozing.

The Millat Express was heading from Karachi to Sargodha when it derailed, spilling carriages onto the track carrying the Sir Syed Express from Rawalpindi in the opposite direction.

A clip aired on a local channel showed medics giving an intravenous drip to a conscious passenger whose lower torso was trapped between crushed carriage benches.

Local farmers and villagers were the first at the site, with huge crowds gathering around the carnage of several overturned Pakistan Railways carriages – some clambering on top in an attempt to reach survivors.

The dead were laid out in rows on train seat benches and covered in traditional scarves.

Interior minister Sheikh Rashid, a former railways minister, said the track where the accident occurred was built in the 1880s and described it as “a shambles”.

The Pakistan army and paramilitary rangers from nearby bases were at the site to help.

Prime Minister Imran Khan said he was “shocked” by the accident and promised a full inquiry.