Editor's note: This story is based on a 46-page internal al Qaeda document, details of which were obtained by CNN. A senior U.S. counterterrorism official told CNN that U.S. authorities have concluded it was written by British al Qaeda operative Rashid Rauf. It was discovered by German cryptologists, along with more than 100 other documents, embedded inside a pornographic movie on a memory disk belonging to a suspected al Qaeda operative arrested in Berlin last May. The German newspaper Die Zeit was the first to report on the documents.
(CNN) -- Rashid Rauf was one of al Qaeda's most capable planners, a British citizen who operated for years in Pakistan and planned some of the terror group's most ambitious attacks. And he wrote about them in great detail.
Rauf's detailed analysis -- meant for al Qaeda's senior leadership -- shows he was intimately involved in planning the devastating attack on the London transport system in 2005, and tells the inside story of the planning for that attack and another that failed just weeks later.
Rauf's notes were part of a treasure trove of al Qaeda documents discovered by German authorities that CNN recently obtained access to.
On July 7, 2005, four suicide bombers led by Mohammed Siddique Khan, a British citizen of Pakistani descent, killed 52 people on three London subway trains and a bus.
Rauf's document describes how he recruited both Siddique Khan and Shehzad Tanweer, the two senior members of the conspiracy. He arranged explosives training for them in the tribal areas of Pakistan and communicated with them extensively in the months leading up to the attacks.
Rauf, a British citizen of Kashmiri descent, joined al Qaeda in Pakistan shortly after fleeing the UK in 2002, as police sought to question him after his uncle was murdered.
Rauf had plenty of contacts in militant circles in the UK, and was provided the phone numbers of Siddique Khan and Tanweer, who had decided to leave the UK to take up jihad.
They arrived in Pakistan in November 2004. Rauf waited a while before contacting them to make sure they were not being followed, and then met them in Faisalabad, an hour's drive from Tanweer's home town.
Rauf described his first conversation with them, in a car with the driver of Tanweer's uncle at the wheel. Siddique Khan apologized about the loud music, explaining Tanweer's family would disapprove if they found out about their conversation.
After spending some time with them, Rauf wrote, he became aware of their "sound knowledge," derived from their listening to the tapes of radical preachers Anwar al Awlaki, Abu Hamza al Masri and Abdullah al Faisal.
Siddique Khan had already traveled to Pakistan in 2003 and was associated with a group plotting terrorist attacks in the UK that was thwarted in February 2004 in what authorities called "Operation Crevice."
In the subsequent trial of five people convicted for the plot, one of the group told British authorities that Siddique Khan had attended a training camp with them in northwestern Pakistan in 2003.
Rauf wrote that at the time Siddique Khan and Tanweer were "ready for martyrdom operations" and expected to be arrested at any moment, as they assumed that police would have known about their role in the plot.
After the attack it emerged that Britain's domestic intelligence agency, MI5, had conducted surveillance of Siddique Khan and Tanweer but failed to keep tabs on them or link them to the conspiracy. A subsequent official enquiry exonerated the agency of failing to prevent the 7/7 bombings, saying it had only finite resources to dedicate to surveillance.
Rauf described how in order to throw the intelligence services off their scent, Siddique Khan and Tanweer pretended to be "un-Islamic" -- going to the cinema and joking loudly to each other.
Rauf wrote that after leaving Islamabad, where he had housed them for a while, he travelled with the duo to the tribal areas to meet with a senior al Qaeda operative he called "Haji." U.S. intelligence believes this was Abu Ubaidah al Masri, then a leading member of al Qaeda's external operations unit, who died in late 2007.
"He would guide us throughout," Rauf wrote. "His experience in Europe and technical knowledge of explosives was important to the operation."
According to Rauf, meeting with Haji had a "profound effect on the brothers." It took Haji just a few days to persuade the duo to conduct a suicide bombing in the UK.
Rauf wrote that Haji arranged for a trainer called Marwan Suri to provide bomb-making training using hexamine peroxide detonators and hydrogen peroxide. Siddique Khan and Tanweer test-detonated a 300-gram hydrogen peroxide mixture in the tribal areas. "Siddique was always saying to me I hope these mixtures are as good as you say they are. After he tested the mixtures he was very happy," Rauf wrote.
Rauf stated that he spent a lot of time with the 7/7 duo. He recalled how they would sit and talk for long periods. He stressed that getting to know them so well really helped when it came to communicating with Siddique Khan after they returned to the UK to prepare the attack.
Rauf wrote that he himself supervised the recording of the duo's martyrdom tape in a house in Islamabad they were renting after their training. Rauf recalled being annoyed because there was no natural light. The duo were reluctant to make the recordings because they were shy but had agreed because Haji had ordered them to.
Rauf said that the three potential targets given to them were the Bank of England, the upcoming G-8 summit in Gleneagles, Scotland, scheduled for July 6-8, 2005, or the London Underground.
Rauf agreed on a series of code words for future communication with Siddique Khan. The two bombers were instructed not to do anything for three weeks after returning to Britain, in case British intelligence was suspicious about their trip to Pakistan.
Rauf described how the duo then began purchasing bomb components, including hydrogen peroxide in gardening stores, hexamine in camping stove fuel and citric acid, which was easily available.
Rauf described communicating with Siddique Khan through e-mails, phone calls and, most usefully, Yahoo Messenger. He and Siddique Khan would change e-mail addresses frequently, informing each other of the new addresses in code to prevent detection. "We would also exchange mobile numbers in code," he wrote.
British authorities were subsequently able to establish that Siddique Khan received several calls in the lead-up to the attack from a phone booth in Rawalpindi, Pakistan. A senior U.S. counterterrorism official tells CNN that the individual making these calls was Rauf. The UK inquest heard that one call was made just five days before the bombings.
Siddique Khan ruled out attacking the G-8 summit because it would demand a large amount of explosives.
British authorities established after the attack that Siddique Khan, Tanweer and two suicide bombers they had recruited in the UK -- Germaine Lindsey and Hasib Hussain -- traveled to London in June 2005 to conduct surveillance of targets. Rauf wrote that after conducting the surveillance, it was decided to attack trains at four London Underground stations.
Rauf wrote that in the lead-up to the attack, he narrowly escaped arrest in Pakistan after a raid by the Pakistani army on a house he was staying at in the tribal areas. He hid in a loft to avoid capture.
Shortly before the attack, Siddique Khan began to boil down hydrogen peroxide to turn into explosives in an apartment in Leeds. But he told Rauf he was unsure he had reduced it to the correct strength. Rauf wrote that he provided Siddique Khan with technical guidance to ensure he got the bomb mixture right.
Siddique Khan's wife suffered a miscarriage just before the planned attack, but he decided to proceed with the plot.
When the bombers travelled to London on the morning of July 7, 2005, they were instructed to leave the tops off the containers containing their explosives to prevent their overheating. As a further precaution, they stored the bombs in breathable Gore-Tex bags. "With the blessings of Allah I think it rained on the day of the attacks which means the weather was cooler," wrote Rauf.
Just before 8:50 a.m., three of the suicide bombers detonated their devices on subway trains.
The fourth bomber -- Hasib Hussain -- was delayed and arrived at King's Cross subway station to find it closed. He then went to a McDonald's before detonating his device on a bus. Rauf wrote that from the media accounts, he concluded that in the McDonald's, Hussain was checking to see if the gas had been released or not from his device.
A second attempt: July 21, 2005
Rauf was far from finished with his campaign to terrorize London. He already had another team preparing to attack the transport system.
On July 21 four men led by Muktar Said Ibrahim, an Eritrean immigrant to the UK, attempted to detonate bombs on public transport -- and were unsuccessful only because the main charge of their explosive devices failed to detonate.
Of the four bomb plotters, only Ibrahim traveled to Pakistan. The others were recruited by Ibrahim into the plot in the UK.
"This is confirmation that al Qaeda was behind the 7/21 plot as well -- something I don't think was clear before," Yassin Musharbash, the Die Zeit journalist who first reported on the documents, told CNN.
Rauf's document for the first time provides compelling evidence that the plot was planned by al Qaeda "central" in Pakistan.
Rauf wrote he met the ringleader Ibrahim and two other members of his UK radical circle shortly after they arrived in Pakistan in early December 2004 with the intention of fighting U.S. forces in Afghanistan.
Ibrahim had attended sermons by radical cleric Abu Hamza al Masri at Finsbury Park mosque in London and had attended mock training camps and paintballing sessions organized by another radical preacher in the UK. Rauf wrote MI5 agents had monitored them during these activities.
Rauf discovered that Ibrahim's travel group had been questioned by British authorities at Heathrow airport, making them miss their flight. Eventually they were able to travel.
Rauf wrote the trio explained away the large amount of cash they were carrying by pretending that one of their party was getting married in Pakistan, and showed the security services a wedding ring as part of the ruse.
According to Rauf, British intelligence had asked Pakistan's military intelligence service -- the ISI -- to keep tabs on the group, and at one stage ISI agents visited a house where they were staying.
Rauf instructed them in countersurveillance methods and told them to behave as if they were about to attend a wedding.
Like the 7/7 duo, Ibrahim's group was driven to tribal areas of Pakistan and introduced to Haji, the senior al Qaeda operative.
But whereas Siddique Khan's group successfully detonated a 300-gram hydrogen peroxide bomb when they were training in Pakistan, something went very wrong when Ibrahim's group attempted to blow up two test devices. As he stood back a distance, Ibrahim saw his two friends killed by the explosion.
His friends' "martyrdom" had a "profound effect" on Ibrahim, Rauf wrote. Haji, who had been supervising the test detonations, was able to persuade him to return to the UK to conduct "operational work."
Rauf said he then met Ibrahim back in Islamabad.
"During this time we had to arrange codes to communicate. We also had to record his Wasiya (martyrdom tape)," Rauf wrote.
According to Rauf, Ibrahim had to leave Pakistan before he felt confident in making explosives from hydrogen peroxide because his visa was going to expire in a few days. Rauf blamed his lack of preparation in part on the fact Ibrahim was trained by a less methodical bomb-making instructor than the 7/7 plotters.
Once Ibrahim got back to the UK in March, Rauf wrote, "he called us by cell phone to let us know he was safe." But after that, there was no further contact. Eventually an intermediary reported back to Rauf that Ibrahim would get back to him soon.
When the abortive attacks took place, Rauf wrote he only found out that Ibrahim was involved when his identity was revealed by the media.
Rauf wrote that he regretted he had not been able to communicate with Ibrahim and pass on the same technical fixes he had provided the 7/7 plotters as they prepared their attack.
"It was their lack of technical knowledge that caused the problem," Rauf wrote.
Rauf, as he did with the 7/7 plot, expressed surprise that the July 21 cell was able to construct bombs -- even though some of its members had been on the radar screen of British intelligence services.
Ultimately, Ibrahim's cell failed to kill a single Londoner without expert guidance from thousands of miles away. Rauf himself is thought to have been killed in a drone attack in Pakistan in November 2008.