Updated

The Maldivian High Court has overturned a public flogging sentence for a 15-year-old rape victim whose conviction sparked outrage among rights groups and focused attention on the island nation treatment of women.

The High Court issued a statement on Wednesday saying that the girl, whose step-father is on trial for raping her, had been wrongly convicted by a juvenile court of having pre-marital sex with another man.

The court said the sentence was handed down based on a confession that the child made while she was suffering post-traumatic stress disorder, adding she had been "unfit for trial".

The Maldivian government appealed on behalf of the teenager following an international outcry over the February sentence to punish her with 100 lashes when she reached the age of 18.

The girl, who cannot be named for legal reasons, was charged after police investigating a complaint that she was raped by her step-father found that she had also been having consensual sex with another man.

Premarital sex is illegal in the Maldives, a popular honeymoon destination in the Indian Ocean, which observes elements of Islamic Sharia law as well as English common law.

Maldivian President Mohamed Waheed was "overjoyed" with the High Court decision, his spokesman Masood Imad told AFP on Thursday.

"The president is overjoyed and he welcomes the court's decision," Imad said. "It is the government's policy to protect victims, but we had to do it within the framework of the law."

The London-based rights group Amnesty International, which campaigned to spare the victim, said she should never have been put on trial in the first place.

"Annulling this sentence was of course the right thing to do," Polly Truscott, Amnesty International's Deputy Asia-Pacific Director, said in a statement.

"We are relieved that the girl will be spared this inhumane 'punishment' based on an outrageous conviction," she said.

The child's step-father faces up to 25 years in prison if convicted of rape and a murder charge, after he allegedly killed a baby which resulted from his alleged rape of his step-daughter.

The UN as well as international rights groups have repeatedly asked the Maldives to end the "barbaric practice" of flogging women.

The fornication laws do not apply to foreigners visiting the atoll nation known for its up-market tourism.

Tourists and locals are kept apart in the Maldives, with the expensive holiday resorts favoured by the rich and famous subject to different rules to the rest of the country.

In September a court in the Maldives ordered the public flogging of a 16-year-old who confessed to premarital sex. Her lover was jailed for 10 years.