A man jailed 11 years ago for the rape of a schoolgirl has been cleared after judges said the conviction was unsafe.
The Court of Appeal ruled that medical evidence seen at the trial of Paul Steven Flay, from Maesteg, at Cardiff Crown Court could have misled the jury.
Lord Justice Toulson said Mr Flay had steadfastly fought the case and his defence was one of "complete denial".
The Criminal Cases Review Commission (CCRC) found expert testimony given at trial was "entirely neutral" in effect.
Mr Flay, 41, was convicted of seven counts of indecency, two of indecent assault, and one of rape in February 1998 and was jailed for seven years.
The hearing on Wednesday heard the prosecution relied on expert medical evidence which, although not conclusive, suggested that the girl may have been sexually abused.
Mr Flay's legal team told the court the evidence by the CCRC investigation fatally undermined the prosecution's case at the trial.
Lord Justice Toulson said the appeal court had reached the "ultimate conclusion" that the guilty verdicts were unsafe.
The judge emphasised that the court's decision did not imply any criticism of Mr Flay's accuser, who is now an adult.
He told the court: "It is simply that the jury, whose duty it was to decide the case, may have been influenced in its judgement by misleading evidence.
"It is for that reason that the verdicts cannot stand."