Jacqui Smith, the home secretary, has asked the attorney general to investigate possible "criminal wrongdoing" by the MI5 and the CIA over its treatment of a British resident held in Guantánamo Bay, it was revealed tonight.

The dramatic development over allegations of collusion in torture and inhuman treatment follows a high court judgment which found that an MI5 officer participated in the unlawful interrogation of Binyam Mohamed. The MI5 officer interrogated Mohamed while he was being held in Pakistan in 2002.

It emerged tonight that lawyers acting for Smith have sent the attorney general, Baroness Scotland, evidence about MI5 and CIA involvement in the case, which was heard behind closed doors in high court hearings. In a letter seen by the Guardian, they have asked Scotland - as an independent law officer - to investigate "possible criminal wrongdoing". The move could lead to a criminal prosecution.

The evidence was suppressed following gagging orders demanded by David Miliband, the foreign secretary, and the US authorities. The action by Smith, the minister responsible for MI5 activities, is believed to be unprecedented.

A Home Office spokesman confirmed tonight that the letter and closed evidence had been sent to the attorney. It had no further comment.

Tonight Clive Stafford Smith, director of the legal charity Reprieve, which represents Guantánamo detainees, welcomed the move. He said: "This is a welcome recognition that the CIA cannot just go rendering British residents to secret torture chambers without any consequences, and British agents cannot take part in American crimes without facing the music".

He added: "Reprieve will be making submissions to the attorney general to ensure that those involved in these crimes – from the US, Pakistan, Morocco, Britain, and elsewhere – are held responsible."

Richard Stein of Leigh Day, which is acting for Mohamed in the British courts, said: "Ultimately the British government had little choice in the matter, once they conceded that a case had been made out that Binyam Mohamed was tortured."

"The Convention Against Torture rightly imposes an obligation on signatory states to investigate cases of torture, and we look forward to a full and open airing of the crimes committed against Mr Mohamed and a thorough investigation by the Police and Crown Prosecution Service into this case."

Reprieve has argued that the case against Mohamed should be dropped by the US government, and that he should be returned to the UK, as the British government requested in August 2007. It says Mohamed is a victim of "extraordinary rendition" and torture.

They claim that all the evidence against him was the "fruit of torture". Mohamed was seized in Pakistan and later secretly rendered to Morocco, Afghanistan, and then to the US base in Cuba. He claims that while in Morocco he was tortured by having his penis sliced with a razor.

In the high court earlier this month, Lord Justice Thomas and Mr Justice Lloyd Jones condemned as "deeply disturbing" a refusal by the US to disclose evidence. In a particularly damning passage, they said claims by Mohamed's lawyers that the US was refusing to release the papers because "torturers do not readily hand over evidence of their conduct" could not be dismissed and required an answer.

Charges against Mohamed - including that he was involved in a dirty bomb plot - have been dropped, allegedly to prevent the US from revealing torture evidence. The US authorities now planned to charge him with other offences, the judges noted.

Backstory

Binyam Mohamed, 30, an Ethiopian national who worked in London as a janitor, was held in Pakistan in 2002, where he was interrogated by an unidentified MI5 officer. The CIA secretly rendered him to Morocco. The US flew him to Afghanistan, where he was held incognito before being flown to Guantánamo Bay in September 2004, where he remains. In 2007, the British government asked that he should be released. The US refused and said he must be tried by a special military commission in Guantánamo Bay. In court hearings in Britain, David Miliband, the foreign secretary, has said that documents believed to show Mohamed was tortured must not be released because the US wants to keep the evidence secret. The US has warned that if the UK courts ordered the release of the documents, America might stop sharing intelligence with Britain. MI5 was involved in Mohamed's interrogation in Pakistan, where the high court says he was held unlawfully.

Richard Norton-Taylor