An "urgent" review is being carried out by police after a rape prosecution collapsed when vital evidence was revealed at the last minute.
Liam Allan, aged 22, was charged with 12 counts of rape and sexual assault against one woman and faced the possibility of more than 10 years in prison and a lifetime on the sex offenders' register.
But the day before his trial police revealed 40,000 previously undisclosed text messages between the complainant and her friends which cast doubt on the case against Mr Allan and suggested the alleged victim had pestered him for "casual sex".
The Crown Prosecution Service (CPS) said they offered no evidence in the case on Thursday, as it was decided "there was no longer a realistic prospect of conviction".
The judge said had this information not come to light there could have been a serious miscarriage of justice and called for a review of disclosure of evidence by the Metropolitan Police, as well as an inquiry at the CPS, The Times reported.
Speaking outside court, Mr Allan told The Times: "I can't explain the mental torture of the past two years. I feel betrayed by the system which I had believed would do the right thing - the system I want to work in."
A Scotland Yard spokesman said: "We are aware of this case being dismissed from court and are carrying out an urgent assessment to establish the circumstances which led to this action being taken.
"We are working closely with the Crown Prosecution Service and keeping in close contact with the victim whilst this process takes place."
A CPS spokesman said: "A charge can only be brought if a prosecutor is satisfied that both stages of the Full Code test in the Code for Crown Prosecutors are met, that is, that there is sufficient evidence to provide a realistic prospect of conviction and that a prosecution is required in the public interest.
"All prosecutions are kept under continuous review and prosecutors are required to take account of any change in circumstances as the case develops.
"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.
"Therefore we offered no evidence in the case against Liam Allan at a hearing on December 14 2017.
"We will now be conducting a management review together with the Metropolitan Police to examine the way in which this case was handled."