(CNN)The secret agent who was arguably the West's most important spy inside al Qaeda has never told his full story - until now.
A former spy inside al Qaeda speaks
His name is Aimen Dean.
We have spent hundreds of hours with him over the last three years.
The result is a book we co-authored with him titled "Nine Lives: My Time as the West's Top Spy Inside al-Qaeda" and a CNN documentary presented by Christiane Amanpour that premieres this week.
Dean is telling his story amid signs al Qaeda is reemerging as a global terrorist threat. After focusing in recent years on building up operations in places such as Syria and Yemen, it is now setting its sights on the United States once again.
Al Qaeda leader Ayman al-Zawahiri portrayed America as the "first enemy of the Muslims" in an audio tape released on May 13. This came just weeks after he said in another message, "This is a moment of truth ... let us fight America everywhere."
Aimen Dean (not his birth name) grew up in Saudi Arabia and joined Muslims fighting against the Serbs in Bosnia in the mid-1990s. Then he traveled to Afghanistan, where he personally swore allegiance to Osama bin Laden.
Dean would become one of al Qaeda's most accomplished bomb-makers, and he rubbed shoulders with many of al Qaeda's top leaders, including al-Zawahiri and Khalid Sheikh Mohammed, who would mastermind the 9/11 attacks.
But Dean's life would take a dramatic and redemptive new direction. He could not accept the targeting of civilians by al Qaeda, nor the use of suicide bombers. Dean left Afghanistan, but within weeks was recruited by British intelligence. And he agreed to spy on al Qaeda and its networks of sympathizers.
At great personal risk, he returned to the terrorist group's camps in Afghanistan. He had so many narrow escapes that his MI6 handlers began calling him their spy with nine lives.
As a secret agent at the heart of al Qaeda's chemical weapons program, Dean provided critical intelligence. He also foiled attacks on civilians and saved many lives. In the years after 9/11, he uncovered plans to unleash horrific new forms of terrorism on both sides of the Atlantic.
In the CNN documentary and in his memoir, Dean reveals stunning details about these plots.
His account sheds new light on many key episodes in the war on terror, including the surge in concern among Western intelligence agencies in the months before 9/11 that al Qaeda was planning a major attack. Dean also provides insights on the signals that were missed or ignored as ISIS was building up its underground presence. And he tells the story of how his intelligence career was ended, thanks to leaks from Washington.
ISIS has lost much of its luster to would be jihadis and its territory; jihadist groups have suffered setbacks in Syria. But Dean warns that these groups are far from moribund. ISIS still has money and underground networks in perhaps a dozen countries. He describes this as an era of "aggressive hibernation" among extremist groups.
Unless their message is challenged and exposed as a corruption of Islam, Dean believes these groups will continue to find recruits. This is a battle for the soul of his religion at a time when conflict and radicalization are tearing apart the Middle East.
Despite the risks, Dean explains to Christiane Amanpour why he is determined to tell his story and speak out against the jihadists.
"If they are willing to risk their lives for a cause that is deluded and wrong and mistaken, then it is my belief that we should do the same."