Britain's attorney general ordered an investigation on Thursday into whether the security services played any role in the torture of a British resident recently released from the U.S. military's Guantanamo prison.

Attorney General Patricia Scotland said in a statement she had studied evidence, some of it classified, and decided there were grounds for police to investigate allegations made by former detainee Binyam Mohamed.

Any decision on whether any person should be charged with a criminal offence can only be taken following the police investigation on the basis of an independent assessment of the evidence and the public interest, she said.

Mohamed, an Ethiopian citizen with British residency, was detained in Pakistan in April 2002 as he was trying to leave the country on a false passport.

He says British intelligence agents were aware he was being tortured and abused by Pakistani authorities during two months of detention but did nothing to stop it.

He says he was subsequently flown to Morocco by the CIA, where he was again tortured and asked questions that he said could only have been supplied by British intelligence.

Britain has denied any role in torture or of colluding with other authorities that might have tortured Mohamed.

Mohamed, 30, spent nearly seven years in custody in Pakistan, Morocco, Afghanistan and at the Guantanamo Bay detention facility in Cuba. The United States suspected him of receiving al Qaeda training in Afghanistan and Pakistan.

Mohamed was released from Guantanamo last month and returned to Britain a free man. All charges against him were dropped.

(Reporting by Luke Baker; Editing by Angus MacSwan)