A second police force is reviewing all of its rape cases after a judge criticised errors that saw charges against an Oxford University student dropped days before his trial.

Oliver Mears, 19, spent two years on bail accused of raping and assaulting a woman in July 2015.

But the Crown Prosecution Service (CPS) decided to offer no evidence against him on the basis of fresh evidence, including a diary that supported his case, which was passed to the CPS just last week.

Surrey Police admitted “there were flaws in the investigation” after the force failed to examine the woman’s “digital media” – which was only handed to prosecutors on Monday – or follow “a reasonable line of enquiry”.

After the case collapsed on Friday, Jon Savell, the forces head of public protection, said: “We are reviewing all our current rape cases to ensure that investigations are thorough, timely, effective and compliant with policy and guidelines.”

It comes after Scotland Yard announced a review of every one of its sex crime investigations, where a suspect has been charged, following the collapse of two rape prosecutions in a week.

The CPS offered no evidence against both Liam Allan and Isaac Itiary after the late disclosure of evidence that could have assisted the defendants.

On Friday, prosecutor Sarah Lindop told Guildford Crown Court the case against Mr Mears was “finely balanced” from the start and the new material “tips the balance” in favour of the teenager.

Judge Jonathan Black demanded the head of the CPS Rape and Sexual Offences (RASO) unit write to him within 28 days “with a full explanation of what went wrong” before he decides whether any action is required “at CPS or police level”.

He said: “It seems to me in a case which is as finely balanced as you say it was, there have been unnecessary delays in investigating… leading to what seems to be a completely unnecessary last-minute decision in this case.

“Both Oliver Mears and the complainant have had this matter hanging over their heads for two years in circumstances, had the investigation been carried out properly in the first instance, that would not have led to this position.”

Ms Lindop admitted there were “some disclosure matters” in Mr Mears’s case, but said it “is not a disclosure case per se”.

“There was a diary produced. Part of that was disclosed, we asked for the full copy of it,” she told the judge.

The court heard Mr Mears’s lawyers asked to see the full diary in October last year and the prosecutor explained: “The police have been trying to secure that.

“I have been made aware of it coming into the possession of the Crown last week. That contains material that was not of assistance to the prosecution.”

She said the diary was not the only reason for the decision, adding: “The situation is we were waiting for third party material, which included matters of a sensitive nature to the complainant in the case.

“We were also awaiting confirmation from the police in terms of the digital devices that were secured.”

Surrey Police said the case was dropped for “a number of reasons”, only one of which related to the force.

“This is an investigative issue and not related to disclosure,” a statement said. “We accept that there were flaws in the initial investigation.

“It was not expedient and the investigator did not examine the victim’s digital media during the initial stages of the investigation or follow what we would consider to be a reasonable line of enquiry.”

Amber Rudd

A file was passed to the CPS in May 2017 – almost two years after the alleged offences – and the decision to charge Mr Mears was made the following month.

Mr Savell said: “On January 5 2018, the CPS requested that we provide materials from the victim’s digital media.

“We then contacted the victim, obtained the devices and provided the available material to the CPS on January 15.

“Surrey Police deeply regrets mistakes made in the efficacy of investigations and will always seek to implement continual improvement and specific learning points.”

Surrey Police launched a joint review of the case with the CPS.

A CPS spokesman said: “We keep all cases under continual review. Following a review of this case, prosecutors were not satisfied there was a realistic prospect of conviction as the evidential test set out in the Code for Crown Prosecutors was not met.

“We therefore decided to offer no evidence.”

It came as Home Secretary Amber Rudd met with Police and Crime Commissioner David Munro and officers from Surrey Police to talk about local policing during a visit to the county on Friday.