By CNN National Security Analyst Peter Bergen
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.
The news that Canadian law enforcement on Monday arrested two men accused of planning to derail a passenger train in the Toronto area has attracted much attention, in part, because the plotters are also charged with "receiving support from al Qaeda elements in Iran."
If these allegations are true, it would appear to be the first time that al Qaeda elements based in Iran have directed some kind of plot in the West.
And it also underlines the perplexing relationship between the Shia theocratic state of Iran, which the Sunni ultra-fundamentalists who make up al Qaeda regard as heretical but with which they have had some kind of a marriage of convenience for many years.
While there isn't evidence that al Qaeda and the Iranian government have ever cooperated on a terrorist attack, al Qaeda's ties to Iran, surprising perhaps to some, stretch back more than a decade.
As recently as October, the U.S. Treasury named as terrorists six al Qaeda members living in Iran who it alleged were sending fighters and money to Syria to fight Bashar al-Assad's regime and were also funding terrorism in Pakistan.
Al Qaeda's Iranian presence began after the fall of the Taliban in Afghanistan during the winter of 2001 when some of Osama bin Laden's family and his top lieutenants fled to neighboring Iran, where they lived under some form of house arrest.
They included Saif al-Adel, the Egyptian military commander of al Qaeda; Sulaiman Abu Ghaith, bin Laden's son-in-law and spokesman; and Saad bin Laden, one of the al Qaeda leader's older sons who has played a leadership role in his father's organization.
Saad helped bin Laden's oldest wife, Khairiah bin Laden, and a number of his father's children to move to Iran in 2002. Bin Laden's sons Ladin, Uthman and Muhammad and his daughter Fatima, who is married to Sulaiman Abu Ghaith, settled in Tehran, the Iranian capital.
According to Saudi officials, it was from al Qaeda's leaders in Iran that al Qaeda's Saudi affiliate received the go-ahead in 2003 for a number of terrorist attacks in Saudi Arabia that killed scores of Saudis and Westerners and targeted Saudi Arabia's oil infrastructure.
In 2008, al Qaeda kidnapped Heshmatollah Attarzadeh-Niyaki, an Iranian diplomat living in the Pakistani city of Peshawar.
According to a Pakistani intelligence official familiar with the deal, al Qaeda released the diplomat back to Iran in 2010 as part of a negotiation that allowed some of bin Laden's family and al Qaeda members then living in Iran to leave.
By now, relations between al Qaeda and Iran were tense.
In a letter recovered from the Abbottabad, Pakistan, compound where bin Laden was killed by a U.S. Navy SEAL team two years ago, bin Laden urged caution when his family members traveled out of Iran "since the Iranians are not to be trusted."
Bin Laden wrote that his family "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."
Last month Sulaiman Abu Ghaith, bin Laden's son-in-law and one-time al Qaeda spokesman, was brought to a Manhattan courtroom to face charges of conspiracy to kill Americans.
Abu Ghaith left the comparative safety of his longtime refuge in Iran for Turkey earlier this year. Turkey then deported him to his native Kuwait via Jordan, where he was detained by FBI agents who escorted him to New York.
Abu Ghaith and the two suspects just arrested in Canada, 30-year-old Chiheb Esseghaier of Montreal and 35-year-old Raed Jaser of Toronto, will obviously be the subject of much interest from U.S. and Canadian intelligence officials.
Those officials will surely be seeking answers to the precise nature of the Iranian government's relationship with al Qaeda over the past decade.
Has it been passive acquiescence or more active complicity?