Rimsha Masih, thought to be 14-years-old, was arrested nearly a month ago in Islamabad after being accused of burning pages of the Koran by outraged locals who attacked her.
Judge Muhammad Azam Khan has released her and set bail at $10,500 (£6,200).
The prosecution dismissed medical examinations, doctors said Ms Masih was “mentally slow”, others have gone as far as to claim that she has Downes Syndrome.
In court last Friday local cleric Khalid Chishti was accused of framing her after planting pages from the scripture in the bag Ms Masih was seen carrying.
Mr Chishti’s legal term used “hyper technical arguments” to challenge the court order to release her.
Coming from a village with a minority of Christians her parents have been concerned about her safety
This has sparked international controversy regarding Pakistan’s blasphemy laws, especially since she is a minor and should not have been sent to jail.