The man accused of hatching the devastating plot to fly hijacked passenger planes into US landmarks 20 years ago is locked up awaiting trial. But could he have been stopped years before?
"He was my guy."
Frank Pellegrino was sitting in a hotel room in Malaysia when he saw the television pictures of the planes crashing into the Twin Towers. The first thing he thought was: "My God, it's got to be Khalid Sheikh Mohammed."
The target and the ambitions were a match and Pellegrino was in a unique position to know.
The former FBI special agent had pursued Mohammed for nearly three decades, yet the alleged 9/11 mastermind is yet to face justice.
A lawyer for Mohammed has told the BBC it may be another 20 years before the case is concluded.
Osama Bin Laden, at the time the leader of al-Qaeda, is the man most closely associated with the 9/11 attacks. But the reality was that Mohammed - or "KSM" as he became known - was the "principal architect", according to the 9/11 Commission which investigated the attacks. He was the man who came up with the idea and took it to al-Qaeda.
Born in Kuwait, he studied in America before fighting in Afghanistan in the 1980s. Years before the 9/11 attack, FBI Agent Frank Pellegrino had been on the trail of the jihadist.
Pellegrino had been assigned by the FBI to investigate the 1993 bombing of the World Trade Center. That was where Mohammed's name first came to the attention of US authorities because he had made a money transfer to one of those involved. The FBI agent realised the scale of Mohammed's ambition in 1995 when he was linked to a plot to blow up multiple international airliners over the Pacific. In the mid-1990s, Pellegrino had come close to getting his man, tracking him to Qatar.
He and a team went to Oman from where they planned to cross into Qatar and arrest Mohammed. A plane was ready to bring the suspect back. But there was resistance from US diplomats on the ground. Pellegrino went to Qatar and told the ambassador and other officials at the embassy that he had an indictment against Mohammed for the plot involving airliners. But he says they seemed wary of causing trouble in the country.
"I guess they thought maybe this was rocking the boat," Pellegrino recalls.
Eventually the ambassador informed Pellegrino that Qatari officials claimed to have lost Mohammed. "There was angst and there was anger and frustration," he says. "We knew at the time it was a missed opportunity."
But he acknowledges that in the mid-90s Mohammed was not seen as a high-priority target. Pellegrino could not even get him listed on America's Top Ten Most Wanted. "I was told there's too many terrorists in there already."
Mohammed seems to have been tipped off about the US interest in him and fled Qatar, ending up in Afghanistan.
Over the next few years KSM's name kept cropping up, often in phone books of terror suspects arrested across the world, making clear he was well connected. It was during these years that he went to Bin Laden with the idea of training pilots to fly planes into buildings inside the US.
And then 9/11 happened. Pellegrino's suspicions of KSM's role would be proven right when a key al-Qaeda figure in custody identified him. "Everybody realised it was Frank's guy that did it," Pellegrino recalls. "When we found out he was the guy, there was nobody more miserable than me."
In 2003, Mohammed was tracked down and arrested in Pakistan. Pellegrino hoped he would stand trial under the indictment he had worked on. But then he disappeared. The CIA had taken him to a "black site" where "enhanced interrogation techniques" were used.
"I want to know what he knows, and I want to know it fast," a senior CIA official said at the time.
Mohammed was waterboarded at least 183 times, something described as "near drownings". He was subjected to rectal rehydration, stress positions, sleep deprivation, forced nudity, and told his children would be killed.
He would confess to multiple plots during that time. But a Senate report later found that much of the intelligence supposedly produced had been made up by the detainee.
After details of the CIA's detention programme were revealed, "high value detainees" like Mohammed were moved to Guantanamo Bay in 2006. The FBI were finally allowed access.
In January 2007 Frank Pellegrino came face-to-face with the man he had pursued for so long.
The men sat across the table from each other.
"I wanted to let him know I'd been involved in indicting him in the 90s," he says, in the hope of opening up the conversation to extract information about 9/11.
The former FBI man won't disclose the details of what was said but conceded "he's a very engaging guy with a sense of humour, believe it or not".
KSM has often been seen "grandstanding" at hearings in Guantanamo and Pellegrino describes the world's most infamous terrorist suspect as "Kardashian" in his craving for attention but says he shows no remorse.
Would he confess or want to make the most of a trial? "I certainly think he's OK with what he did, but he likes the show," he says.
After six days of talking Mohammed finally said he had had enough. "And that was it," recalls Pellegrino.
Subsequent attempts to deliver justice for 9/11 have floundered. A plan to hold a trial in New York faltered after public and political opposition. "Everyone was screaming 'I don't want this guy in my backyard. Keep him down in Guantanamo,'" says Pellegrino, himself a New Yorker.
Next came a military tribunal at Guantanamo. But procedural delays, compounded by the Covid pandemic closing the base, have made it a long-drawn out process. More hearings are taking place this week but an end looks a long way off.
Mohammed's lawyer believes the latest hearings are timed to show the media that something is happening on the 20th anniversary of 9/11. David Nevin told the BBC he expects "something in the order of 20 years for a complete resolution of the process."
The criminal defence lawyer has been on the case since it began in 2008. The original plan was to begin trials almost immediately. But they are still not even close to starting, he says, noting a newly appointed judge is "the eighth or ninth judge that we have had" depending on how you count.
The judge has to familiarise himself with around 35,000 pages of transcripts of previous hearings and thousands of motions in what Nevin describes as the "largest criminal trial in the history of the United States".
And it is the most controversial.
That is primarily because the five defendants were all held in secret detention by the CIA and subjected to "enhanced interrogation techniques."
That has led to arguments over evidence being contaminated by what happened at the so-called black sites.
The United States "organised and implemented a clearly defined programme to torture these men," says Nevin. Those methods provide plenty of scope for potential appeals against any convictions dragging on for years.
Nevin won't disclose details of what it's like to represent one of the world's most notorious defendants. He says initially his client was "deeply sceptical" of being represented by an American lawyer so there was a long process of getting to know each other.
When Mohammed was held in a top-secret part of the naval base the lawyers were put in a van with the windows blacked out and driven around for 45 minutes to disorient them, he says. But now his client is held in the less secret Camp 5.
The legal team are alive to the sensitivities of the 9/11 victims' families who are flown out to attend tribunal hearings. At meetings some family members will challenge lawyers like Nevin about representing defendants, but others will ask questions about how the process works.
"We work awfully hard to not do anything that will exacerbate the pain and suffering they've experienced over the years," says Nevin.
Another reason he believes the tribunal has dragged on is because it's a death penalty case and that raises the stakes. "It would have been over long ago if the government weren't seeking to execute these men."
Pellegrino delayed his retirement from the FBI by three years in the hope that Mohammed's military tribunal at Guantanamo, which he expects to testify at, would be completed. "It would have been nice to see this through while I still had the badge."
But the veteran special agent hit retirement age and has just left the bureau.
Having crossed the world pursuing leads on Mohammed, he now feels a strong sense of failure, wondering whether capturing him in the 1990s might have prevented 9/11.
"His name comes up in my head every day and it's not a pleasant thought," he says.
"Time helps heal things. But it is what it is."