A judge has criticised the Home Office over contradictory MI5 intelligence in secret hearings involving two terrorism suspects, it has emerged.
The lawyer was representing both of the terror suspects
The error came to light only because one barrister acted in both Special Immigration Appeals Commission cases.
Mr Justice Newman said the "administration of justice" had been put at risk in the cases of Algerian Abu Doha and a suspect known as MK.
The Home Office said the "error was not due to any systemic failure".
But human rights campaigners called for an urgent review of the way MI5 intelligence is used in such hearings.
The cases were being heard separately by the Special Immigration Appeals Commission, known as Siac.
But after MK's case had finished it became clear that the evidence against him was being contradicted by that in the Abu Doha hearings.
In a ruling produced in May, but only now made public, the judge accepted the mistake was not deliberate.
But Mr Justice Newman went on to say the "administration of justice is put at risk" if such failures occur.
Shami Chakrabarti, director of human rights group Liberty, said: "Our worst fear has been realised when the government submits flawed secret intelligence to a commission, which will determine if people are to be returned to countries where they may face torture.
"The home secretary has a duty to explain why the commission was misled, and how this can possibly be prevented under these shadowy arrangements in the future."
The home office said the judge's comments had been noted and steps were being taken to ensure such an error could not occur again.
"The secretary of state and security service note the constructive comments made by Siac in its judgment concerning the methodology and approach which should be taken when preparing evidence," a spokesman said.
"We accept their recommendations and are taking this forward with independent counsel who acts for the secretary of state in these cases.
"Siac with the assistance of the special advocates, has identified an oversight in the secretary of state's disclosure process in this case.
"That this resulted from an error is accepted and steps are being taken to ensure that this does not occur again."
Siac is the venue of appeal for foreign nationals facing detention, deportation or exclusion from the UK on grounds of national security.
Its hearings and rulings are never fully made public because they include testimony from members of the secret security services, which the government says it cannot divulge.