A CROWN court judge has attacked the way a sex case was handled by officials after a trial was abandoned when new evidence emerged.

Judge Stephen Hopkins QC said the case prepared by Gwent Police and Gwent Crown Prosecution Service against Graham Williams was “amongst the worst the I have ever seen.”

He spoke at Newport Crown Court as he sentenced Williams, 38, of Pontllanfraith, Blackwood, for sexual activity with a child under-16.

Williams previously pleaded not guilty and faced trial in August, but on the fifth day the court was shown evidence of texts sent between the defendant and the teen.

Judge Hopkins said he had no alternative, once the evidence emerged, but to send the jury home.

Prosecutor Jenny Treharne told the sentencing hearing that Williams admitted a six-week sexual relationship in late 2008 and 2009 with the girl, who cannot be identified for legal reasons. She said he was aware that what he was doing was wrong, having told the girl no one must find out or he would have his children taken away.

In mitigation Williams' counsel Lawrence Jones said there is no evidence that the defendant had a predilection for young girls and that his pre-sentence report said he was at a low risk of reoffending.

The judge sentenced Williams to two years and eight months in prison.

But Judge Hopkins only passed sentence after stating that Williams was misled about the strength of evidence against him prior to the initial trial.

He said on the trial's fourth day the CPS and prosecuting counsel became aware of "text correspondence that did exist and had always been available" between Williams and the teenager.

Judge Hopkins said that, after the evidence emerged, he had told Williams he would offer him full credit for a guilty plea, both because of the new evidence and to spare the complainant from giving evidence a second time.

Williams was also given a sex offences prevention order and told he would have to register on the sexual offenders register indefinitely.

The judge said: "The back ground to this sentencing hearing is this, of the many Gwent Police and Gwent CPS cases which come before me and my full time collegues which often vary from the inadequatly to the incompetently prepared, the investigation and prosecution of this case is amongst the worse I have ever seen."

IN A joint statement Gwent Police and Gwent CPS said they take the comments of the judge very seriously. "With every case we investigate and prosecute, it is our intention to do so to the highest possible standard," a spokesman said. "We will work together to investigate with urgency the circumstances of this case."