The child, who cannot be named, was handed the draconian flogging sentence for “fornication” in February, triggering a petition by the global campaign network Avaaz and anger from opposition and women’s rights groups in the country. Two million people worldwide signed the petition calling for the sentence to be commuted.

Last week, the Maldivian High Court overturned the sentence, which was hailed as a victory by Avaaz. But the organisation said that the case was a one-off and called for a moratorium on all flogging sentences in the Maldives, which is under the Islamic government of President Mohammed Waheed Hassan.

The girl has been under house arrest on an island near the capital Malé since her sentence. She is now free but campaigners hope she will remain in the care of the state to continue her education, rather than be returned to her family where she could be at risk of further abuse.