A court in the Maldives has overturned a flogging sentence on a 15-year-old girl who was raped by her stepfather.

Her case sparked global controversy after she was sentenced to 100 lashes after she "confessed" to premarital sex with another man while being questioned about her rape.

The High Court issued a statement saying that the girl had been wrongly convicted by the juvenile court and quashed the sentence.

It said the punishment was handed down based on a confession she made while suffering from post-traumatic stress disorder, adding she was not fit for trial at the time of the case.

Her case led to an appeal launched by the Maldivian government. Her step-father is currently on trial for raping her and killing the baby she was carrying for him. He was first investigated after the body of the baby was found on the island of Feydhoo in Shaviyani Atoll.

Maldives 'unfairly treated'

Had her sentence not been overturned, she would have been flogged at the age of 18.

She was charged after police investigating her rape case found out she had been having sex with another man.

Maldivian president Mohamed Waheed said he was "overjoyed" with the decision. His spokesman, Masood Imad, said: "It is the government's policy to protect victims, but we had to do it within the framework of the law."

Polly Truscott, Amnesty International's deputy Asia-Pacific director, said: "We are relieved that the girl will be spared this inhumane punishment based on an outrageous conviction, which we hope has also been quashed.

"No-one should ever be prosecuted for sex outside marriage in the first place."

Imad said the girl was currently in state care. He said the Maldivian government had been unfairly targeted over the case in terms of the way women were treated on the holiday island.

"Since the new government came to power [in February 2012], not a single flogging has been carried out in this country.

"We have been unfairly treated over this issue. Some have called for a boycott of the Maldives. There are so many horrible rapes in India, but they don't say boycott the Indian economy. We are doing everything within the law to ensure that women and children are protected."