Editor's note: Peter Bergen is CNN's national security analyst, the author of "Manhunt: The Ten-Year Search for bin Laden -- From 9/11 to Abbottabad" and a director at the New America Foundation.
(CNN) -- The appearance Friday in a lower Manhattan courtroom of Sulaiman Abu Ghaith, Osama bin Laden's son-in-law and one-time al Qaeda spokesman, to face charges of conspiracy to kill Americans underlines the perhaps surprising fact that members of bin Laden's inner circle have been living in Iran for the past decade or so.
It was Abu Ghaith's decision to leave the comparative safety of his longtime refuge in Iran for Turkey a few weeks ago that led to the chain of events that landed him in Manhattan for trial.
The leading Turkish newspaper, Hurriyet, reported that Abu Ghaith was detained in the Turkish capital, Ankara, in early February. Turkey then decided to deport him to his native Kuwait via Jordan, where he was intercepted by FBI agents, who escorted him to New York.
As is well known, many of bin Laden's family and members of his inner circle fled Afghanistan for Pakistan after the fall of the Taliban in the winter of 2001, but what is less well known is that some also fled to neighboring Iran.
According to U.S. documents and officials, in addition to Abu Ghaith, other of bin Laden's inner circle who ended up in Iran include the formidable military commander of al Qaeda, Saif al-Adel, a former Egyptian Special Forces officer who had fought against the Soviets in Afghanistan, as well as Saad bin Laden, one of the al Qaeda's leader older sons who has played some kind of leadership role in the group.
Saad bin Laden spent the first six months of 2002 living in Karachi in southern Pakistan. From there he helped one of his father's wives, Khairiah bin Laden, and several of his father's children to move from Pakistan to Iran.
For years these bin Laden family members all lived in the Iranian capital, Tehran, under some form of house arrest. Their conditions were not unpleasant, with time for visits to swimming pools and shopping trips.
Meanwhile, U.S. intelligence learned that some al Qaeda operatives were living in the northern Iranian town of Chalus, on the Caspian Sea.
In 2002 a U.S. Navy SEAL operation into Chalus was planned and then rehearsed somewhere along the U.S. Gulf Coast.
The chairman of the Joint Chiefs, General Richard Myers, called off the assault because the information about where precisely the al Qaeda members were living in Chalus was not clear.
A year after that operation was called off, according to US and Saudi officials, from his Iranian refuge Saif al-Adel authorized al-Qaeda's branch in Saudi Arabia to launch a series of terrorist attacks in the Saudi kingdom that began in the capital Riyadh in May 2003, a campaign that killed scores of Saudis and expatriates.
On the face of it, the fact that a number of al Qaeda leaders and operatives and bin Laden family members found shelter in Iran is puzzling, as the Shia theocrats in the Iranian regime are hostile to the Sunni ultra zealots in al Qaeda, and vice versa.
For al Qaeda's operatives, life in Iran was more secure than for many of their colleagues in Pakistan who risked capture by Pakistani forces working with the CIA or death by CIA drones.
The Iranian regime likely saw the al Qaeda operatives as useful bargaining chips with the United States in the event of some kind of peace negotiations with the Americans. That peace deal, of course, never happened.
Of course, for Iran the adage, "the enemy of my enemy is my friend" may have also come into play, although there doesn't seem to be evidence that Iran and al Qaeda have ever cooperated on a specific operation.
That said, the 9/11 Commission found that of the 19 hijackers, "8 to 10 of the 14 Saudi "muscle" operatives traveled into or out of Iran between October 2000 and February 2001." Whether this was with any degree of Iranian complicity is still an open question.
The fact that leading members of al Qaeda were based in Iran from 2002 on was known to the U.S. government at the time. (In fact, in early 2003 counterterrorism officials briefed me about this development).
There is something of an irony here. This was during the same time period in which senior administration officials under President George W. Bush were citing the alleged presence of al Qaeda members in Baghdad and a supposedly burgeoning alliance between al Qaeda and Iraq's leader Saddam Hussein as a key reason to go to war against Saddam, Iran's bitter enemy.
Five years after the invasion of Iraq, the Senate Select Committee on Intelligence concluded, as had every other official investigation of the matter, that in fact there was no "cooperative relationship" between Saddam and al Qaeda.
In late 2008 al Qaeda operatives kidnapped Heshmatollah Attarzadeh-Niyaki, an Iranian diplomat, in the western Pakistan city of Peshawar.
After holding the diplomat for over a year the militants quietly released him back to Iran in the spring of 2010.
This was part of a deal that allowed some of bin Laden's family and al Qaeda members living under house arrest in Iran to depart, according to a Pakistani official familiar with the deal.
This deal did not, however, mean that relations between the Iranians and al Qaeda suddenly became all hunky dory.
Documents recovered at bin Laden's compound in Abbottabad, Pakistan, following the SEAL raid there on May 1, 2011, and since publicly released portray a rather tense relationship between al Qaeda and the Iranian authorities.
In a letter that bin Laden wrote just five days before he died he described a document from his son Saad who had lived in Iran for years "which exposes the truth of the Iranian regime." What bin Laden meant precisely by this is not clear, but taken together with some of the other letters that were found in his Abbottabad compound it is obvious that bin Laden and his men were quite distrustful of the Iranian regime.
A letter to bin Laden from his chief of staff dated 11 June 2009 has a detailed account about a group of "mid level" al Qaeda members who the Iranians had recently released, including three Egyptians, a Yemeni, a Iraqi and a Libyan.
Bin Laden's chief of staff attributed these releases to al Qaeda's kidnapping of the Iranian diplomat in Peshawar, but added that the Iranians "don't want to show that they are negotiating with us or reacting to our pressure. ... We ask God to repel their evil."
In another undated letter from bin Laden to his chief off staff al Qaeda's leader gave a set of detailed instructions about how best to handle his family members living in Iran once they were released.
Bin Laden urged extreme caution "since the Iranians are not to be trusted." Among another precautions, he wrote that his family members "should be warned about the importance of getting rid of everything they received from Iran like baggage or anything even as small as a needle, as there are eavesdropping chips that have been developed to be so small they can be put inside a medical syringe."
In this letter bin Laden mentioned by name a number of his children living in Iran including his sons Ladin, Uthman and Muhammad and his daughter Fatima, who is married to Sulaiman Abu Ghaith who now sits in a Manhattan jail.
In October the U.S. Treasury named as terrorists six al Qaeda members living in Iran who it said are funding terrorist activities in Pakistan and sending fighters and money to Syria to fight the Assad regime there.
Abu Ghaith didn't play an operational role in al Qaeda -- a fact that was underlined in the charges filed against him last week in Manhattan that revolve around his role as a propagandist for the group. So it is the precise nature of al Qaeda's arrangements in Iran and the kind of activities outlined in the recent Treasury designation of the half-dozen al Qaeda members living in Iran that are likely to be of most interest to American investigators.
Given the fact that since 9/11, New York courts have convicted at a rate of 100% in cases that involve members of al Qaeda and associated groups, Abu Ghaith could doubtless cut an attractive plea deal for himself if he gives a full accounting of al Qaeda's murky decade in Iran.
Follow @CNNOpinion on Twitter
Join us at Facebook/CNNOpinion