A 13-year-old girl has dug herself out of a grave after being raped and left for dead.

The girl's father told police his daughter was abducted by two unidentified men while she was going to a seminary for Koran lessons in the Toba Tek Singh district of the Punjab province of Pakistan, Outlook India reported. The district is about 225 kilometres from the provincial capital Lahore.

The men took the girl to a deserted place and raped her. They believed she had died during the assault and buried her by the roadside, her father Siddique Mughal said.

However, the girl regained consciousness and dug her way out of the mud covering her. She raised the alarm and caught the attention of a passerby, who took her to a nearby rural health centre.

Police initially refused to investigate, but the Lahore High Court Chief Justice's Complaint Cell took notice of the incident on Saturday and directed the district and sessions judge of Toba Tek Singh to investigate the matter.

The sessions judge subsequently directed police to take steps to arrest the rapists, complete their investigation and submit a report to the court without delay.

According to Sahil, an Islamabad-based activist group, cases of child sexual abuse covered by the media grew from 668 in 2002 to 2788 in 2012, the Washington Post reported recently. Pakistan's government did not release frequently updated statistics for child sexual abuse.

"We still think these statistics are just a fraction of what's going on," group executive director Manizeh Bano said.

For generations, rape was a taboo subject in the conservative Muslim society, but thanks to a freer media and a push by child-welfare advocates to get families to report such crimes, the number of cases under investigation was rising.