A full bench of Western Cape High Court judges ruled on Tuesday that Lance Bessick's conviction and sentencing in the Atlantis Regional Court in July 2009 was invalid, the Cape Times reported.
Bessick was found guilty largely based on the girl's testimony, who was 15-years-old when she testified. But she had indicated that she did not understand the meaning of an oath or affirmation.
Judge Robert Henney, in his judgment, said the unnamed magistrate had failed to explain the meaning of the oath and had then skipped to the next step, which was to hold an informal investigation into whether she knew the difference between a lie and the truth.
Henney said it was "not a mere non-compliance with a technicality", but a process required by law to ensure a reliable version of events was placed before the court.
"The impact of improper conviction and subsequent incarceration is much greater for the accused."