Iran has always considered that al Qaeda could never be a friend: al Qaeda itself says Iran is an enemy. But pragmatically, the Iranian state has looked to see if the interests of the terrorist group aligned with its own. Iran's policy towards al Qaeda after 2001 in the decade that followed was ‘laissez-faire’. Iranian territory was a zone of transit for al Qaeda fighters heading to Afghanistan. Iran generally let them go about their way, but they didn’t give them any logistical help. The authorities certainly had information about this passage of combatants. They often came from the Middle East and travelled to Afghanistan, usually to fight American troops. Iran and al Qaeda had interests in common, and as long as those interests didn’t hurt Iran, the state let the group’s fighters pass through.
"There is absolutely no proof that there is a concrete link between Iran and al Qaeda"
But with the Syrian conflict, all that completely changed. It brought the Sunni-Shiite dimension into play. Today, we can say that Iran is completely disposed to supporting the Iraqi and Syrian regimes. That has changed its relationship with al Qaeda. For Iran, it became unthinkable that men could use its territory as a transit point to go fight Shiites in Iraq, or Hezbollah in Lebanon [a Shia movement], or the Syrian regime [the regime is dominated by Alawites, an offshoot of Shia Islam]. Now, al Qaeda is a problem for Iran because it targets far more strongly the Shia community.
There is absolutely no proof that there is a concrete link between Iran and al Qaeda. There are no doubt hundreds of prisoners belonging to al Qaeda in Iran’s prisons. But it’s difficult to know how many. What makes things more complex is that for Iran, the definition of al Qaeda is very vague. For example, there is an ongoing rebellion in the Sunni-majority east of the country. People here consider themselves Sunni, and say the regime is oppressing them. The Iranian government may consider people who carry out attacks there as members of al Qaeda, even if they're not.