They claim the cleric Hafiz Mohammed Khalid Chishti planted pages of the Qur'an in a bag of burned refuse that Masih had been seen carrying through her neighbourhood on 16 August. She lives in an impoverished near-slum on the outskirts of Islamabad where a minority community of Christians live.

Lawyers representing the man who originally claimed to have caught Rimsha carrying what he thought were burned verses from Islam's most holy book tried to block the bail.

Rimsha's legal team responded by saying they were using "hyper technical arguments" to try to challenge the paperwork of the bail hearing.

The prosecution also attempted to undermine a medical board's assessment that Rimsha was legally a minor and that she was "mentally slow". Rimsha's supporters have long claimed she has Down's syndrome.

A decision on whether she will have to stand trial will be made after officials have finished their investigation into an affair that has cast unprecedented light on Pakistan's notorious blasphemy laws, which have been widely abused over the years and can carry the death penalty or long jail terms.

Ali Dayan Hasan, the Pakistan director of Human Rights Watch, said the organisation welcomed the court decision and urged the government to guarantee her security.

"The fact is that this child should not have been behind bars at all," he said. "All charges against her should be dropped and Pakistan's criminal justice system should instead concentrate on holding her accuser accountable for inciting violence against the child and members of the local Christian community."

He said the organisation hoped the case would "lead to a considered re-examination of the law".

However, most analysts say reform, let alone repeal, of the decades-old law is highly unlikely as the country gears up for national elections.