The Met Police is to hold an “urgent” review of a rape case after being accused of failing to disclose vital evidence.
Liam Allan, 22, was charged with 12 counts of rape and sexual assault but his trial collapsed after police were ordered to hand over phone records.
A computer disk containing 40,000 messages revealed the alleged victim pestered Mr Allan for “casual sex”.
Prosecution barrister Jerry Hayes accused police of “pure incompetence”.
The charges against the criminology student were dropped three days into the trial at Croydon Crown Court when Mr Hayes took over the case.
It is understood police had looked at thousands of phone messages when reviewing evidence in the case, but had failed to disclose to the prosecution and defence teams messages between the complainant and her friends which cast doubt on the allegations against Mr Allan.
The CPS said it offered no evidence in the case on Thursday as there was “no longer a realistic prospect of conviction”.
Mr Allan told the BBC he was “overwhelmed” at the moment, adding: “It’s a huge amount of confusion to go from being the villain to being innocent.”
He also told The Times he had suffered two years of “mental torture… I feel betrayed by the system which I had believed would do the right thing — the system I want to work in.”
Mr Hayes said there had very nearly been “a massive miscarriage of justice” which could have led to Mr Allan being imprisoned for 12 years and being put on the sex offenders register for life.
He said the disk contained information which “completely blew the prosecution case out of the water”, although he believed the information had not been disclosed because of “sheer incompetence”.
“The trouble is everyone is under pressure… This is a criminal justice system which is not just creaking, it’s about to croak,” he said.
The BBC’s Legal Correspondent Clive Coleman said he understood the defence had asked repeatedly for the phone messages to be disclosed, which included details saying how the alleged victim had spoken to friends about how much she enjoyed having sex with Mr Allan.
Mr Allan’s solicitor Simone Meerabux said when her client was arrested he had told police about the existence of the messages but “in spite of all that he was charged”.
She said prior to the trial the CPS had told them there was “nothing further to disclose” and it was only after they reiterated their request on the first day in court that the information was made available.
A Met spokesman said the force was “urgently reviewing this investigation and will be working with the Crown Prosecution Service to understand exactly what has happened in this case.
“The Met understands the concerns that have been raised as a result of this case being dismissed from court and the ongoing review will seek to address those,” he said.
A spokesman for the CPS said: “In November 2017, the police provided more material in the case of Liam Allan. Upon a review of that material, it was decided that there was no longer a realistic prospect of conviction.
“We will now be conducting a management review together with the Metropolitan Police to examine the way in which this case was handled.”