A Maldivian High Court quashed a public flogging sentence of a 15-year-old girl convicted for having premarital sex. The 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 February conviction of the girl sparked international outrage and focused attention on treatment of women in Maldives, which is a favourite holiday destination.

In its order the high court stuck down the sentence of the juvenile court saying that it was based on a confession that the teenager made while suffering from post-traumatic stress disorder. The high court added that she had been "unfit for trial". Following the international outcry, the Maldivian government had appealed on behalf of the teenager.

Maldivian President Mohamed Waheed is said to be "overjoyed" by the high court decision.

In a statement issued on Wednesday, London-based rights group Amnesty International, who campaigned for the victim, said it was relieved that the girl will be spared this "inhumane punishment."

"Annulling this sentence was of course the right thing to do. We are relieved that the girl will be spared this inhumane 'punishment' based on an outrageous conviction," said Polly Truscott, Amnesty International's Deputy Asia-Pacific Director.

"No one should ever be prosecuted for sex outside marriage in the first place. And victims of sexual abuse need counselling, not punishment. The government must make sure that she has continuing access to appropriate support services.

That may be too much to ask for in Maldives. Premarital sex is illegal in the Indian Ocean island nation, which observes elements of both Islamic Sharia law and English common law.

The victim was first arrested by the police in June 2012 who were investigating the death of a baby who was found buried outside her home on Feydhoo island. The police found that it was her baby. Meanwhile, in a separate case, the girl's step-father is being tried on charges of raping her and the murder of her baby. The girl's mother has also been charged for concealing the crime.

A juvenile court in the Maldives capital, Malé, in Feb 2013 sentenced the girl to 100 lashes and eight months house arrest for "fornication".

The Amnesty International statement said that in 2009, at least 180 people faced the punishment of flogging for "fornication". Some of them are survivors of rape and other forms of sexual abuse. Media reports indicate that almost 90 per cent of the individuals convicted of "fornication" in Maldives in 2011 were female.