Dame Eliza Manningham-Buller (pictured) wrote to the then Prime Minister, Tony Blair, to complain about the behaviour of those working for MI6

Britain's former security chief was so enraged when she discovered the role played by MI6 officers in abductions which resulted in suspected extremists being tortured she banned them from working at MI5's headquarters, it has been revealed.

The former Director General of MI5, Eliza Manningham-Buller, even wrote to the then Prime Minister, Tony Blair, to complain about the behaviour of those working for MI6, according to the Guardian.

She claimed that their actions had harmed Britain's intelligence gathering and therefore could have compromised the safety of MI5 officers.

The letter came at the height of the 'war on terror' - the military campaign which was launched after the September 11 attacks on the United States.

And the note sent to Blair, 63, by Manningham-Buller, 67, supposedly caused a breakdown of trust between the two spy agencies.

It highlighted the deep divisions between MI5 - responsible for domestic intelligence - and MI6, which is responsible for foreign intelligence.

The letter was discovered when investigators were looking into the rendition of exiled Libyan opposition leader, Abdul Hakim Belhaj.

He was seized in Bangkok, Thailand, in 2004 following a UK-US operation and was handed over to the CIA.

Belhaj - who was a critic of the former Libyan dictator, Muammar Gaddafi - claims the CIA tortured him and that officers injected him with 'truth serum'. He then alleges he was flown to Tripoli, Libya, to be interrogated.

Investigators found Manningham-Buller's letter after they examined whether British intelligence officers should face criminal charges over the rendition - which is when a foreign criminal or terrorist suspect is interrogated in a country with less rigorous regulations.

And five days before he was secretly flown to Tripoli, documents suggest that the MI6 provided Gaddafi's intelligence agency with the French and Moroccan aliases used by Belhaj.

It is also thought that MI6 provided the Libyans with information which resulted in the CIA being able to kidnap Belhaj and fly him to the Libyan capital.

Belhaj told the Guardian he was 'very surprised' that British intelligence officers were among the first to interrogate him in Libya.

He said: 'I wasn't allowed a bath for three years and I didn't see the sun for one year.

'They hung me from the wall and kept me in an isolation cell. I was regularly tortured.'

The confidential role played by MI6 was eventually revealed when documents were discovered in offices of Gaddafi's intelligence chief, Moussa Koussa.

Abdul-Hakim Belhaj was kidnapped with his family and rendered to Libya where he claims he was tortured

A letter from Sir Mark Allen, the former head of counter-terrorism at MI6, to Moussa Koussa congratulated him on the 'safe arrival' of Abdul-Hakim Belhaj.

The Guardian report that his letter - dated March 18, 2004, said: 'This was the least we could do for you and for Libya to demonstrate the remarkable relationship we have built over the years. I am so glad.'

And the investigation into the alleged involvement of intelligence officers in Libyan rendition operations has been concluded by Scotland Yard, and a decision whether to prosecute is forthcoming.

Whitehall sources told the Guardian that key witnesses claim they are unable to recall who authorised Britain's involvement in the rendition programme or provide any detail about Belhaj's abduction.

One said that the problem was that the Crown Prosecution Service cannot bring a charge against a government policy.

Tony Blair (pictured) said he did not have 'any recollection at all' of the Belhaj rendition

The Guardian report that Manningham-Buller, who was director general of the MI5 from 2002 to 2007, was 'shocked and appalled' by the treatment of Belhaj.

The files the CPS has are understood to describe how Belhaj and his family along with Sami al-Saadi were taken to Gaddafi's interrogation cells.

The British government paid £2.2m to settle a damages claim brought by al-Saadi and his family.

Belhaj has refused to settle unless he receives an apology.

Jack Straw, who as foreign secretary was responsible for MI6, has denied wrongdoing.

In December 2005, he told MPs: 'There is simply no truth in the claims that the United Kingdom has been involved in rendition full stop.'

Blair said he did not have 'any recollection at all' of the Belhaj rendition.

MailOnline has contacted the Home Office and Foreign Office for comment.