An MI5 officer will not be prosecuted over the mistreatment of UK resident Binyam Mohamed in Pakistan in 2002.
Mr Mohamed alleges MI5 was complicit in his torture but Director of Public Prosecutions Keir Starmer QC said there was insufficient evidence.
MI5 chief Jonathan Evans said he was "delighted" and described the officer as a "dedicated" public servant.
The decision comes the day after the government paid compensation to former Guantanamo Bay detainees.
The BBC understands that although the officer will not be prosecuted over the interview in Pakistan, an investigation into a second allegation has not been completed.
In his statement, Mr Starmer said: "The Crown Prosecution Service has advised the Metropolitan Police Service that there is insufficient evidence to prosecute Witness B for any criminal offence arising from the interview of Binyam Mohamed in Pakistan on 17 May 2002.
"We are unable to release further information at this stage because the wider investigation into other potential criminal conduct arising from allegations made by Mr Mohamed in interviews with the police is still ongoing."
Witness B was at the heart of allegations made by Mr Mohamed that the British security and intelligence agencies knew that he had been mistreated and tortured.
Mr Mohamed was arrested in Karachi in April 2002 and taken to a detention facility. There, CIA officers questioned him about alleged links to terrorism.
But he was then subjected to what the Court of Appeal in the UK later described as "at the very least cruel, inhuman and degrading treatment".
This included threats, sleep deprivation and shackling, part of a CIA-approved plan to use harder interrogation techniques against key suspects.
On 17 May, an MI5 officer using the name John conducted a three-hour interview with Mr Mohamed at the detention facility.
Mr Mohamed says that during this interview, which was also attended by a US agent, he was told that he could be removed from the facility and taken somewhere else to be tortured by "the Arabs".
But in his evidence in the High Court, Witness B denied the allegations, saying that he told Mr Mohamed he could help if he was persuaded that the detainee was being truthful.
The CIA later flew Mr Mohamed to Morocco where, according to court papers, torture included cuts to his genitals.
In a statement, MI5's director general Jonathan Evans said: "I am delighted that after a thorough police investigation the Crown Prosecution Service has concluded that Witness B has no case to answer in respect of his interviewing of Mr Binyam Mohammed.
"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."
Despite the decision not to charge over the May 2002 allegations, an investigation into Witness B's visit to Morocco, while Mr Mohamed was held there, continues.
A separate investigation into an MI6 officer, which the Secret Intelligence Service referred to the police, also continues.
Tim Cooke-Hurle, of legal charity Reprieve, which represented Binyam Mohamed, said: "We welcome the news that the police are pursuing wider investigations into the abuse of Binyam Mohamed and others.
"Rather than scape-goating front-line officers, the investigation must focus on the chain of command that may have allowed torture complicity by the British Security and Intelligence Services, to ensure that it never happens again."
The decision not to prosecute comes the day after the government paid compensation to 16 men from the UK who were held at Guantanamo Bay, including Mr Mohamed.
The confidential out-of-court deal ends a massive damages claim brought by some of the men, under which they were demanding to see secret documents detailing their detention and ill-treatment by US forces in the wake of 9/11.