By Gordon Corera
Mr Mohamed claims confessions were obtained using torture
The case of Binyam Mohamed is the clearest example yet of the dark and dangerous moral terrain that British intelligence walked after 9/11, not least in its relationship to its closest ally.
British intelligence was never involved in directly torturing Mr Mohamed nor were they in the room when he was, but they were involved in a wider process that has led to serious allegations being levelled.
Even before Mr Mohamed has given any interviews following his return, many of the details of that relationship have already been made public thanks to a series of High Court hearings and judgements, including the testimony of an MI5 officer known only as "Witness B".
Just over five weeks after Mr Mohamed was detained in April 2002, the MI5 officer made his way to a detention facility in Pakistan to see him.
The man in front of him looked noticeably thinner than the photograph provided to him, a fact he noted but without questioning Mohamed on the possible reasons.
The US and UK both believed the Ethiopian was dangerous and was planning some kind of attack so they wanted information. The question was how it should best be obtained.
The MI5 officer had been despatched after MI5 sent a telegram to the US requesting access to the prisoner.
The telegram made the case that the security service's "knowledge of the UK scene may provide contextual background useful during any continuing interview process…This will place the detainee under more direct pressure."
Some 250 inmates remain at the US camp in Guantanamo
In his note of the meeting, the MI5 officer recalled "I told Mohamed he had an opportunity to help us and help himself. The US authorities will be deciding what to do with him and this will depend to a very large degree on his degree of cooperation."
Was this a threat? The MI5 officer denied this in the High Court. There is a dispute about further details and whether or not the officer warned Mr Mohamed something along the lines of the fact that he would not be getting tea with sugar where he was going.
Whatever the case, Mr Mohamed was allegedly soon transferred by the CIA to a secret prison in Morocco, as part of its extraordinary rendition programme, where he claims he was tortured for months.
In the first of those months, British intelligence continued to provide information to the US despite knowing he had been moved to another location unknown to them.
Complicity with torture?
It is thought this included pictures and details of people he may have known in London. Mr Mohamed says this was the low point for him when he came to believe, based on questions put to him, that the British government was involved in his treatment. So was this complicity with torture?
The attorney general is currently considering whether or not to open an investigation into any possible criminal wrongdoing by British intelligence officials and is consulting with the director of public prosecutions.
Any decision to investigate will send shock waves through British intelligence. However, a decision not to investigate will lead to cries of a cover-up.
There are questions about whether the committee which oversees the work of the intelligence agencies - the Intelligence and Security Committee - has the teeth to get to the bottom of what really happened as well.
What is clear is the US and UK seemed to believe Mr Mohamed was a threat and were determined to extract any information he had.
The irony is that the process they undertook revealed nothing worth charging Mr Mohamed with or sufficiently serious to prevent him being released now.
Instead it has served only to draw attention to the darker side of US tactics post 9/11 and the degree to which British intelligence was involved.