Recently, for the first time, Iran revealed some details about its many intelligence organizations. In the course of celebrating the 30th anniversary of the religious dictatorship in Iran, state controlled media allowed articles to be published giving details of all the “Islamic States’” accomplishments. This included mentioning that there are sixteen intelligence agencies. That’s a few more than were widely known using unclassified sources.
In the past it was widely known that Iran had MISIRI (Ministry of Intelligence and National Security of the Islamic Republic of Iran), which had numerous different departments that were apparently more independent that outsiders thought. This makes sense as dictatorships tend to have multiple independent intelligence agencies who are meant to be independent so they can be more effective keeping an eye on each other to ensure no one is plotting against the government.
Then there is the Quds Force, something of a cross between the CIA and the U.S. Army Special Forces. This outfit has been studied a lot, in part because it supports terrorism and operates a lot outside Iran. The Quds Force has been around since the 1980s, and their biggest success has been in Lebanon, where they helped local Shia (who comprise about a third of the population) form the Hezbollah organization.
The Quds Force has a lot of different responsibilities. To handle this Quds has eight departments, each assigned to a different part of the world. While the one that works in the Palestine/Lebanon/Jordan area have been the most successful, the other departments have been hard at it for over two decades. For example Quds Force helped Hezbollah create Unit 1800, whose main function is to help train Palestinian Islamic terrorists.
The Western Directorate has established a recruiting and fund raising network in Western nations. Many recruits are brought back to Iran for training, while Shia migrants are encouraged to donate money, and services, to Quds Force operations. Because many of these operations are considered terrorist operations, Quds Force is banned in many Western nations.
The Iraq Department long maintained an army of anti-Saddam fighters in exile (in Iran) as well as running an intelligence operation inside Iraq. After the coalition toppled Saddam in 2003, Quds Force moved people, money and weapons into Iraq, to form pro-Iranian political forces and militias. These are the men withdrawn after 2008 and who are back now helping fight ISIL (Islamic State in Iraq and the Levant).
The South Asia Department (Afghanistan, Pakistan, and India) was active in aiding Afghan Shia who were being persecuted by the Taliban (a Sunni operation) and al Qaeda (a very Sunni operation). Quds has also been caught operating in Pakistan, where Sunni terrorists have been attacking Shia for decades.
The Turkey Department has been active encouraging Shia Kurds to commit terrorist acts.
The North Africa Department has an operation in Sudan that functions in the open despite the Sunni conservatives who run the country. This department was caught providing weapons to the Sunni Islamic Courts militia in Somalia in 2007 and later providing support for the even more radical al Shabaab.
The Arabian Department supports terrorist groups that exist in all the Persian Gulf Arab countries. The Arab Sunni governments in these nations does not appreciate Iran’s support for this sort of thing.
The Central Asian Department supports Shia and Sunni terrorists in countries that used to be part of the Soviet Union. So does al Qaeda, but the Quds operation has been more discreet.
Back in Iran, Quds is believed to provide safe houses (or house arrest) for al Qaeda and other Sunni Islamic terrorist leaders, even though al Qaeda has taken part in many atrocities against Shia outside Iran. However, the "enemy of my enemy is my friend." Actually, there is an ongoing dispute in the Iranian government over the al Qaeda issue. But the Iranian leadership is more a federation than a dictatorship, so Quds can keep being nice to al Qaeda as long as not too many factions get mad at Quds.
The Iranian leadership, despite their radical sounding pronouncements, have actually been quite cautious. This is in line with ancient Iranian custom. Most of the Hezbollah violence in Lebanon was at the behest of Lebanese. The same pattern has occurred elsewhere. The Quds guys usually counsel restraint, although in Iraq there has been more enthusiasm for violence. Iraq is a special case, as several hundred thousand Iranians died fighting Saddam in the 1980s, and Iranians have not forgotten. While Saddam is dead and gone many of his followers are in ISIL and for the Iranians the debt is still not paid.