Baroness Mannigham-Buller spoke at a lecture in the House of Lords
The former head of MI5 has claimed US intelligence agencies "concealed" their mistreatment of terror suspects.
Baroness Eliza Manningham-Buller said she only discovered alleged 9/11 mastermind Khalid Sheikh Mohammed was waterboarded after retiring in 2007.
In a lecture at the House of Lords, she said the US had been "very keen to conceal from us what was happening".
Her comments follow controversy over UK agents' alleged collusion with US counterparts using torture techniques.
Last month it emerged that Binyam Mohamed, a British resident formerly held at Guantanamo Bay, had been subjected to "cruel, inhuman and degrading" treatment.
Ministers and current MI5 head Jonathan Evans have insisted that there was no collusion by UK security officers.
By Gordon Corera, security correspondent, BBC News
Eliza Manningham-Buller's intervention has provided a few more insights into the contentious issue of what the UK knew about the US treatment of detainees but it does not provide us with a full picture or final answers.
From what she said, it is clear that in at least one case the UK learned of mistreatment and lodged protests with the US.
But in other instances, notably the case of Khalid Sheikh Mohammed, Lady Manningham-Buller indicated the service had not known that he was waterboarded.
In the crucial case of Binyam Mohamed, we know that MI5 at some point did receive documents from the US detailing his treatment in Pakistan but we do not know who exactly saw these and at what stage.
Answering the question of who knew what and when will be central to the ongoing police investigation into possibly complicity in torture.
However, questions remain about exactly when they learnt that the US apparently changed its rules on torture after the 9/11 attacks.
Lady Manningham-Buller, who headed MI5 between 2002 and 2007, said: "The Americans were very keen that people like us did not discover what they were doing."
In a lecture at an event organised by the Mile End Group, she said she had wondered, in 2002 and 2003, how the US had been able to supply the UK with intelligence from Khalid Sheikh Mohammed and was told that he was "very proud of his achievements when questioned about it".
"It wasn't actually until after I retired that I read that, in fact, he had been waterboarded 160 times," she said.
Lady Manningham-Buller said the government had lodged "protests" with the US about its treatment of detainees, but refused to go into further detail.
A Foreign Office spokeswoman was not prepared to comment on the former MI5 chief's comments.
She said the Foreign Office could not, at this stage, find any details of protests lodged by the British government with the US over the treatment of detainees.
BBC security correspondent Gordon Corera said Lady Manningham-Buller's remarks were an acknowledgement MI5 had been slow to realise what the US was doing.
However, he said, there was still not a complete picture of what happened.
"It is clear that at some point documents came to the UK saying he [Binyam Mohamed] had been mistreated by the US. What we don't know is exactly when those documents came and... who saw them," he told BBC Radio 4's Today programme.