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 an angry mob accused her of burning pages of the Koran and demanded her punishment.
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 that 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, our correspondent reports.
Rimsha has been held at a high security prison since 16 August. Since her arrest there have been conflicting reports about Rimsha's age and mental capacity.
Doctors who examined her last week said she appeared to be about 14 and that her "mental age appears below her chronological age".
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 following threats, and many other Christian families have fled the neighbourhood.
Pakistan's strict blasphemy laws are a highly sensitive subject in the country, but they are also often used to settle personal vendettas, correspondents say.
And ever since the arrest of Imam Khalid Chishti, who prosecutors say will face blasphemy charges himself, campaigners have been pressing for Rimsha's release.
This case has only served to intensify concerns over the misuse of Pakistan's blasphemy laws.
Last year two leading politicians were assassinated after speaking out against the legislation.