Residents gather around the wreckage of carriages at Rahim Yar Khan district of Punjab province. (AFP)

The death toll from a train collision in central Pakistan rose to 23 on Friday after several people succumbed to their injuries overnight, officials said.

The incident took place Thursday in Rahim Yar Khan district in Punjab province when a passenger train coming from the eastern city of Lahore rammed into a goods train that had stopped at a crossing.

The accident saw mangled carriages flipped on their sides and left debris strewn by the sides of the tracks as rescuers used cranes to enable them to pick through some of the twisted wreckage.

"According to the latest updates available with us, the death toll rose to 23 overnight after more people died of their wounds in different hospitals," a senior Pakistan Railways official told AFP.

Residents search for victims in the wreckage of train carriages. (AFP)

He said a total of 73 people were still being treated for injuries.

Another senior railways official confirmed the toll and said, "rescuers have pulled out all the dead and injured from the wreckage".

"We are now focusing on quickly clearing the track," he said, adding that an investigation has already been ordered.

A crane lifts damaged carriages at the site where two trains collided in Rahim Yar Khan district of Punjab province. (AFP)

Prime Minister Imran Khan has asked the railways minister to take emergency steps to counter decades of neglect in railway infrastructure and ensure that safety standards are upheld.

Train accidents are common in Pakistan, where the railways have seen decades of decline due to corruption, mismanagement and lack of investment.