Image copyright AFP Image caption The court apologised to Huugjilt's elderly parents and gave them some compensation

A court in China has cleared a teenager of the rape and murder of a woman in a public toilet, 18 years after he was executed, state media report.

The teenager, Huugjilt, was 18 when a court in Inner Mongolia convicted him.

His conviction was called into question after a serial rapist confessed to the crime in 2005, Xinhua news agency said.

Such rulings are rare in China. The murder happened during an anti-crime drive and detectives admitted being under pressure to secure a conviction.

Delivering his judgement, the judge in the court in Hohhot apologised and bowed to the tearful parents of the executed teenager.

"The Inner Mongolia Higher People's Court finds Huugjilt's original guilty verdict... is not consistent with the facts and there is insufficient evidence," the court said in a statement.

"Huugjilt is found not guilty."

As an expression of the court's sympathy 30,000 yuan ($4850; £3080) was given to Huugjilt's parents.

High conviction rate

Xinhua reported that Huugjilt had tried to help save the woman after hearing her cry out from a public toilet. He reported the crime to police.

However, in April 1996, he was found guilty of raping and murdering the woman and in June of that year he was executed.

In 2005, a serial rapist and murderer, Zhai Zhihong, confessed to police that he had committed the crime after he was arrested for another crime.

Huugjilt's retrial was held in November this year.

Courts in China are controlled by the Communist Party and have a very high rate of conviction. Rights groups allege that confessions are often extracted under torture.

Correspondents say it is unusual for convictions to be overturned.

Last year a man in the province of Anhui was found not guilty after serving 17 years of a life sentence for killing his wife.