Updated

A British spy will not be prosecuted over allegations he colluded in the torture of ex-Guantanamo Bay detainee Binyam Mohamed, the country's chief prosecutor said Wednesday.

Keir Starmer, Britain's director of public prosecutions, said a police inquiry which began in March 2009 had not produced evidence to support criminal charges against an officer with domestic spy agency MI5.

He is one of two British intelligence officers to be investigated by police over claims security officials were complicit in the mistreatment of detainees held by allies overseas. An inquiry into the conduct of a member of the overseas intelligence service, known as MI6, is continuing.

Jonathan Evans, the head of MI5, said he was delighted the police inquiry had cleared his officer — known in court documents only as Witness B.

"Witness B is a dedicated public servant who has worked with skill and courage over many years to keep the people of this country safe from terrorism and I regret that he has had to endure this long and difficult process," Evans said in a statement.

Mohamed was held in Pakistan and Guantanamo, and says he was also sent by United States officials to Morocco where he was interrogated and brutally tortured. The MI5 officer questioned the detainee in Pakistan on May 17, 2002, when Mohamed alleges he told Witness B he had been tortured. Britain says it was unaware of his mistreatment.

An Ethiopian who moved to Britain as a teenager, Mohamed had charges against him dropped by the U.S. in 2008. He was released from Guantanamo and returned to Britain in Feb. 2009.

Starmer said, however, that a "wider investigation into other potential criminal conduct arising" from Mohamed's allegations was ongoing. London's Scotland Yard declined to comment on the progress of an inquiry into the MI6 officer, but has previously said the investigation is not specifically linked to the alleged torture of Mohamed.

Britain's government on Tuesday confirmed it had reached an out of court settlement with a group of ex-Guantanamo detainees — including Mohamed — who were suing the country for alleged collusion in their torture.

The U.K. made no admission of guilt, but said it had agreed a deal as it could not afford to have more than 100 intelligence officials tied up with a costly and lengthy series of lawsuits likely to last up to 5 years.

British Prime Minister David Cameron has ordered a retired judge to lead a 12-month investigation into the country's conduct in the so-called "war on terror." Foreign Secretary William Hague said the study was necessary to "clear the stain from our reputation as a country."

Cameron said the inquiry would not begin until the two police inquiries had been completed, and the lawsuits against the government were dealt with. Officials now hope the investigation will begin early next year.

Parliament's Intelligence and Security Committee — responsible for oversight of the U.K.'s spy agencies — has previously criticized security officials for failing to press allies for assurances about the treatment of Mohamed and others.

Eliza Manningham-Buller, a former head of MI5 who retired in 2007, has said she believes the U.S. deliberately misled its allies over its handling of detainees.