The trial of a vicar accused of conducting a "matrimonial conveyor belt" of sham weddings has collapsed after the judge accused immigration officers of lying on oath.
The Rev Nathan Ntege, 55, was said to have married almost 500 bogus couples at a church in south-east London.
But the judge ended the trial, alleging "bad faith and serious misconduct on the part of the prosecution".
The case against six people accused alongside Mr Ntege has also collapsed.
The vicar, from Thornton Heath, was on trial at Inner London Crown Court on 14 counts of facilitating a breach of immigration law and one count of fraud.
The prosecution claimed immigration officials became suspicious because of the "inordinate number" of weddings taking place at the parish church, rising from six a year to six a day.
Channel 4 News has reported that when "immigration officers were questioned in the witness box, it emerged that evidence had been tampered with or concealed, possibly destroyed, video footage had gone missing, and an investigation log had been doctored".
Judge Nic Madge said the misconduct started when two of the defendants were arrested in June 2011, and "has continued throughout the course of this trial".
He said: "I am satisfied that this is a case in which there has been both bad faith and serious misconduct on the part of the prosecution.
"I am satisfied that officers at the heart of this prosecution have deliberately concealed important evidence and lied on oath."
Judge Madge added: "If the trial were to be permitted to continue, there is a real risk that public faith in the criminal justice system would be undermined.
"It is a case in which the prosecution should not be allowed to benefit from the serious misbehaviour of the officer in the case or the disclosure officer."
The judge said photographs taken at the vicarage and video filmed at the church from June 2011 had not been made available to the defence.
The officer in the case and/or the disclosure officer had taken measures to ensure the photographs and video footage were not seen and they had also lied about it on oath, the judge said.
Judge Madge also concluded the existence of entries on an investigation log from July 2012 to December 2012 had been concealed and lied about on oath by the officers.
In a statement, the Crown Prosecution Service said it accepted the judge's ruling.
"We take these comments very seriously and we will now be conducting a full review into the handling of disclosure and other issues throughout the trial."
The Home Office said: "The collapse of this trial is an extremely disappointing end to a long investigation.
"We expect the highest standards from all our staff, and clearly we are treating the judge's ruling that our officers acted in bad faith with the utmost seriousness."
Three officers have been suspended and the case has been referred to the Independent Police Complaints Commission.
The six other cleared defendants were: Brian Miller, 81 and Maudlyn Riviere, 67, both of Thornton Heath; Galina Petkova, 51, of Shrubbery Road, Enfield; Georgia Forteath, 34, of south Norwood; Innocent Odoh, 34, of Brownhill Road, Hither Green and Angela Palachie, 54, of Florida Road, Croydon.