Former Pakistan President Pervez Musharraf has cast doubt on Britain's public stance that countries should not torture British citizens on its behalf.
He said he was never told that was the policy and this may have been "tacit approval of whatever we were doing".
His comments raise questions about how much MI5 knew about torture being used in the fight against al-Qaeda.
Former MI5 director general Elizabeth Manningham-Buller denied that "a blind eye had been turned."
Claims that Britain was complicit in the torture of terror suspects in other countries including Pakistan are to be examined by an independent investigation.
The inquiry, chaired by former appeal court judge Sir Peter Gibson, is expected to start within the next two months.
Mr Musharraf was president of Pakistan from 1999 until 2008 and was a key US ally in its conflict with al-Qaeda.
"We are dealing with vicious people and you have to get information," he told BBC Two programme The Secret War on Terror.
"Now if you are extremely decent, we then don't get any information… We need to allow leeway to the intelligence operatives, the people who interrogate," says Mr Musharraf.
When asked does the end justify the means to extract information from suspected terrorists who are reluctant to talk, former President Musharraf responds: "To an extent yes."
Rejection of torture
Binyam Mohamed was arrested in Pakistan in 2002 suspected of plotting a terrorist attack and later detained at Guantanamo Bay.
In a court action, the Ethiopian, who had lived in the UK for eight years, claimed he had been hung by his wrists, beaten with a leather strap, and subjected to a mock execution - all with the knowledge of the UK Security Services. He says the admissions he later made were false and the result of torture.
Some of the detainees who have since received compensation from the British government claimed they were tortured in Pakistan and forced into confessions by its intelligence agency the Inter Services Intelligence (ISI).
Sir David Omand, UK security and intelligence co-ordinator from 2002 to 2005, is unequivocal about the UK's complete rejection of torture.
He said: "I am very clear we are not and have not been complicit in torture and I'm in no doubt that all the countries concerned, including Pakistan and the United States, were very well aware of what British policy was, which was we don't do this and we don't ask other people to do it."
But Mr Musharraf said he had no recollection of having been told by the British government that the ISI should not use torture on British subjects.
"Never. Never once, I don't remember it all," he said.
"Maybe they wanted us to continue to do whatever we were doing; it was a tacit approval of whatever we were doing."
But former director general of MI5 Baroness Manningham-Buller said: "There was no tacit approval of torture."
Denying Britain had been complicit in torture, she added: "I think this raises a much broader question. Al-Qaeda is a global threat. To counter it, we need to talk to services throughout the world.
"We have to be careful and cautious in those relationships, but to decide that we are never going to talk to the following 50 countries in any circumstances means that you are deciding deliberately not to try and find out information that you need to know."
In her first television interview, Baroness Manningham-Buller goes on to talk candidly about the challenges faced by British intelligence after the events of 9/11 as they worked to protect the UK from terrorist attacks.
When asked if she was aware the Americans had been using enhanced interrogation techniques she said: "Not for a quite a long time after they started using them. They chose to conceal it from the allies and indeed from their own citizens."
An FBI employee sent to observe interrogations at Guantanamo said a TV show had provided inspiration for some of the methods used.
Jim Clemente, of the FBI's behavioural analysis unit, said one officer told him: "She actually had watched the television show 24 to get ideas on interrogation methods that they would then utilise at Guantanamo.
"It was outrageous, unbelievable that someone would do something that stupid."