Women protesting the girl's treatment
A Christian girl who has been detained on blasphemy charges for three weeks in Pakistan has been granted bail.
The girl, named as Rimsha, is thought to be about 14 years old. She was arrested in Islamabad after a mob accused her of burning pages of the Koran and demanded her punishment, reports the BBC.
Last week a Pakistani imam was remanded in custody, accused of planting burned pages of the Koran in her bag.
The case has sparked international condemnation.
Judge Muhammad Azam Khan ordered her release and set bail at about $10,500 (£6,200).
The BBC's M Ilyas Khan in Islamabad says Rimsha is the first person accused of blasphemy to have been granted bail by a trial court.
Blasphemy is not a bailable offence but her lawyers pleaded that she was a juvenile.
Rimsha has been held at a high-security prison since August 16. Since her arrest there have been conflicting reports about her age and mental capacity.
Doctors who examined her last month said she appeared to be about 14 and that her "mental age appears below her chronological age".
Rimsha's safety upon her release is likely to be a key concern for campaigners. Her father has previously said that he fears for his daughter's life and for the safety of his family.
Her parents were taken into protective custody at an undisclosed location following threats, and many other Christian families fled the neighbourhood after her arrest.
If her bail payment is met, Rimsha is likely to be reunited with her parents, correspondents say.
There have been cases in Pakistan where people accused of blasphemy have been killed by vigilante mobs.
Indeed Rimsha was arrested by police on August 16 in a poor neighbourhood of Islamabad only after a crowd demanded her punishment, enraged by accusations that she had burned pages of the Koran.
But in an unusual development just weeks later on September 2, police arrested a Muslim cleric from her neighbourhood after his own deputy accused him of planting pages of the Koran in a bag belonging to Rimsha.
Imam Khalid Chishti denies the allegation but prosecutors say he will be charged with tampering with evidence as well as blasphemy.