"A man for all seasons … He's a warrior. He's a poet. He's a scholar. He's a pundit. He's a military commander. And he's a very charismatic, young, brash rising star within …"

This statement could easily be construed as praise, even admiration, for the possessor of such qualities – until one reads who and what it's referring to: "… al-Qaida, and I think he has become the heir apparent to Osama bin Laden in terms of taking over the entire global jihadist movement." So says Jarret Brachman, a former CIA analyst and Westpoint research director, regarding Abu Yahya al-Libi, who was reportedly killed in a US drone-strike in Waziristan this week.

Last September, on a visit to Libya, I met with a rebel military commander who told me that his country wanted "a good relationship with the Americans". That man was Abu Yahya's brother.

I couldn't help wondering at the time, just two weeks after the fall of Tripoli, whether he'd shared his views with his brother, who I knew was regarded by the US as a high-ranking of member of al-Qaida. This was a bizarre paradox: the people I'd come to see, including Sami al-Saadi and Abdel Hakim Belhadj, had been, along with their families, victims of rendition to Gaddafi's Libya instigated by the British government. Yet, now, the cause of these men and that of the duplicitous nations that had facilitated their rendition and torture did, at least for the short term, coincide.

During my stay in the Libyan capital, I visited the notorious Abu Salim prison, where both al-Saadi – who lost two brothers in the infamous 1996 prison-massacre – and Belhadj had been held. Spray-painted on one of the doors by rebels who had broken free from the prison were the words in Arabic: "Life [imprisonment] in Guantánamo is not even a day in Abu Salim." Perhaps that was an exaggeration, but I have also met Libyan former Guantánamo prisoners, who were held in both prisons, and they were not objecting tot his assessment.

I was also shown the cell and final abode of a rendition victim whose tortured testimony was used by the US to justify the invasion of Iraq. Ibn al-Sheikh al-Libi's "confession, which asserted al-Qaida was in partnership with Saddam Hussain in obtaining WMD, was cited by US Secretary of State Colin Powell in 2003 as a source of credible information in his presentation to the UN security council, preceding Operation Iraqi Freedom. But there were no WMDs in Iraq and al-Qaida only materialised there afterwards, and as a direct result of the invasion. A year later, Ibn al-Sheikh retracted his statement; after being bounced around Egypt, Mauritania, Morocco, Jordan, Afghanistan and perhaps Poland, he was returned to Libya where he was found dead in his cell in 2009.

Ibn al-Sheikh's testimony had been taken during interrogations in Mubarak's Egypt, where he'd been sent by the CIA – in a coffin. Prior to that, he was held at the Bagram internment facility, which is where I first learned heard about him after the CIA threatened me with his fate if I didn't cooperate.

Abu Yahya al-Libi was also held in Bagram from 2002, until his dramatic escape in 2005. I was there in 2002, but I did not see him or any of the other three who escaped with him. However, after my release, I did see an interview on the al-Arabiyya news channel, in which Aby Yahya not only described the escape in detail, but also the conditions in Bagram and his experience as a captive of the US.

Having spent so long in Bagram, I found it hard to believe that they had escaped; I saw one man beaten to death during an escape attempt. I also recalled how the CIA had told me that they would "fake" an escape for me if I agreed to work for them, which would springboard me into al-Qaida automatically. But after having heard the detail in which Abu Yahya described the escape, and his actions thereafter, I believe it was genuine. And coupled with his knowledge and the qualities Brachman alludes to above, the escape is precisely what took him to the leadership of al-Qaida. Hardly anyone had heard of him before that.

I've always maintained that Bagram was much worse than Guantánamo; I was looking forward to the latter after being in the former for almost a year. Being punched and kicked, shackled naked to other prisoners and dragged to communal showers, forcibly shaved, hands chained to the tops of cage doors and left suspended were just some of the daily occurrences we all witnessed or experienced. The worst for me was hearing the screams of a woman who I had thought for a time was my own wife. Mercifully, it wasn't, but I am convinced it was someone's wife, mother, daughter or sister; and Abu Yahya and his comrades did more than hear a woman.

Of all the abuses he describes in his account, the presence of a woman and her humiliation and degradation were the most inflammatory to all the prisoners – and they would never forget it. He describes how she was regularly stripped naked and manhandled by male guards, and how she used to scream incessantly in isolation for two years. He said prisoners protested her treatment, going on hunger strike, feeling ashamed they could do nothing to help. He described her in detail: a Pakistani mother – torn away from her children – in her mid-thirties, who had begun to lose her mind. Her number, he said, was 650.

After their escape, which was notably downplayed by the media at the time, Abu Yahya and his comrades all became fighters with al-Qaida and joined the war against the US. He was the last of the four, as one was later captured, another killed in Iraq and the other killed by a drone strike in Afghanistan.

In 2007, I interviewed another so-called al-Qaida leader in the making: Anwar al-Awlaki had been imprisoned in Yemen and interrogated by US agents. Something traumatic, which he was not prepared to discuss with me, had happened during the encounter with the Americans; and not long after, he went from condemning the September 11 attacks to becoming a regional commander of al-Qaida in the Arabian Peninsula, before also being killed by a US drone strike.

Abu Yahya and al-Awlaki, I believe, were both creations of the US-led "war on terror". There were opportunities in the case of the latter to enter into a meaningful dialogue to create understanding, while the former, who also spoke of the decent US soldiers he met, could have been given humane treatment, instead of yet another excuse to hate America.

Killing with drones may have the short-term effect of eliminating a few obscure enemies. But with all the civilian casualties, the strategy is generating still more hostility, at a time when everyone admits that the war – on the ground, and for hearts and minds – is being lost.