Within hours of the U.S. airstrike that killed Qassem Soleimani on January 3, Iranian Supreme Leader Ali Khamenei announced the appointment of a successor to head the Revolutionary Guards' secretive Quds Force.
The speed of the announcement appeared to be aimed at sending a message of continuity.
"The force's mission is exactly the same as it was under the command of the martyr Soleimani," Khamenei said.
If the Quds Force's mission doesn't change, as the supreme leader suggests, its work will likely be based on the histories and influences that have acted on its commanders -- including its new one, Ismail Qaani.
Here is a look at some of those complex influences within the Quds Force.
Quds within Iran's Armed Forces
The Quds Force is one of eight branches of the Islamic Revolutionary Guards Corps (IRGC).
The others are the Ground Resistance Force, commanded by Mohammad Pakpour; the Air Force, commanded by Amir Ali Hajizadeh; the Navy, commanded by Alireza Tangsiri; the volunteer Basij militia, commanded by Gholamreza Soleimani; Intelligence, commanded by Hossein Taeb; Counterintelligence, commanded by Mohammad Kazemi; and Security, commanded by Fathollah Jomeiri.
All eight units operate under the leadership of IRGC commander in chief Major General Hossein Salami and his deputy, Ali Fadavi.
But the Quds Force's commander effectively operates within a parallel structure and is solely accountable to Iran's supreme leader.
The Quds Force is essentially an offshore unit of the IRGC officially begun in the late 1980s.
The existence of such a military unit was never officially acknowledged prior to the outbreak of the Syrian war in 2011. But the Quds Force's extensive involvement in the effort to prop up besieged Syrian President Bashar al-Assad brought the name of the force and its commander, Soleimani, out of the shadows.
Some of the Quds Force's most notable areas of operation have reportedly been Lebanon, where it supports Hezbollah and has reportedly sought greater influence in that country's government and security structures; Syria, where its support has included the formation of pro-government militias; Iraq, including the establishment of the Popular Mobilization Forces (PMF), also known as Hashid Shaabi, which has sought to encourage closer relations with Iran and manage relations with Iraq's Kurdistan region; Yemen, where it has supported the Houthi government in Sanaa against Saudi pressure; Afghanistan, where it has supported political and armed groups close to Iran and sought government influence; and the Gaza Strip, where it has backed Hamas.
Many of those groups -- like the IRGC itself since April -- are among U.S.-designated terrorist organizations.
Beyond those countries, the Quds Force has reportedly been active throughout the Middle East -- including during the simmering Iran-Bahrain dispute -- and suspected members have been detained in Arab Gulf states.
Division of labor
The activities that fall within the Quds Force's current mission were pursued within the framework of multiple organizations prior to Iran's 1979 Islamic Revolution that ousted the shah and brought a clerical regime to power.
One of the Islamic regime's first moves was to organize many of those activities under the command of revolutionary Mohammad Montazeri, who had led armed groups from exile and had close ties to Palestinian and other militants.
After Montazeri's death in 1981, the overseas activities of the IRGC were led by future Supreme Leader Ali Khamenei, who was president at the time.
Khamenei was said to have supported allies including Mahmud Hashemi Shahrudi, who would later head the hard-line Judiciary, in nurturing Iraqi opposition groups in Iran. Shahrudi would purportedly help form and become a spokesman for the Supreme Assembly of the Islamic Revolution in Iraq (SAIRI), which was aimed at providing internal opposition in Iraq during the 1980-88 Iran-Iraq War.
Already during that war, IRGC commander Mohsen Rezaee was disguising official ties to Iranian-backed groups abroad. They were the first serious attempts by the IRGC to consolidate the regime's activities abroad in the face of a potential rival within the system, the newly established Intelligence Ministry.
Rezaee also formed what became known as the Badr Brigade in Iraq, comprising opposition to Iraqi leader Saddam Hussein and officered by Iranians. From its inception, Razaee reportedly sought to escape oversight of the Badr Brigade by the Supreme Council for the Islamic Revolution in Iraq (SCIRI) and its leader, Mohammad Baqir al-Hakim. Hakim reportedly complained about this to influential former revolutionary Ali Akbar Hashemi Rafsanjani and to Khamenei himself.
The ranks of the Badr Brigade in those days included Abu Mahdi al-Muhandis, the deputy commander of the Iranian-backed PMF who was killed along with Soleimani in the Jan. 3 U.S. bombing in Baghdad.
Muhandis had fled to Kuwait from Iraq in the early 1980s and went to Iran after allegedly collaborating with Imad Mughniyeh, a founding member of the Lebanese Islamic Jihad Organization and number 2 person within Hezbollah, to target U.S. and European targets in Kuwait.
Muhandis eventually became commander of the Badr Brigade, which had ties to the IRGC.
Another person active in the Badr Brigade at the time was Hadi al-Ameri, the current head of the Badr Organization, one of the most important groups in the Iran-backed Popular Mobilization Forces (also known as the PMF and Hashid Shaabi) militia in Iraq. During an operation in Karala, both Abu Mahdi Mohandes and Ameri served under commander Hassan Danaeifar, who became Iran's ambassador to Iraq after the U.S.-led toppling of Saddam Hussein.
Another part of the IRGC's offshore activities was carried out within the framework of Operation Ramadan in Iraq. One of the senior commanders of Operation Ramadan and its chief of staff during those years was reportedly Iraj Masjedi, who is now a brigadier general and Iran's ambassador to Iraq.
Another commander in Operation Ramadan was Mohammad Reza Naqdi, who later commanded the IRGC's influential Basij militia in Iran.
In the 1980s, many of the IRGC's activities were carried out in Lebanon, near the Israeli border, and involved Hussein Dehghan, a future Iranian defense minister. Two of those who were trained under Dehghan to command Lebanese Hezbollah during those years were Hassan Nasrallah, who now leads that group, and Hezbollah second in command Mughniyeh.
Two other Iranians who directed and maintained ties to Hezbollah after Dehghan were Ahmad Vahidi, the IRGC's then-commander and the first commander of the Quds Force after its establishment, and Fereydun Verdi Nejad (then known as Mehdi Nejad).
Vahidi and Nejad were also reportedly in charge of negotiating with Americans during the events that led to the Iran-Contra affair in the late 1980s.
Vahidi later became defense minister and now heads Iran's National Defense University. Nejad subsequently directed the Islamic Republic News Agency (IRNA) and is now a media adviser.
After the Iran-Iraq War and the death of Islamic Republic founder Ayatollah Ruollah Khomeini, Ali Khamenei and Hashemi Rafsanjani reportedly tried to create a rivalry between the IRGC and the Intelligence Ministry.
Activities against Iran's political opponents abroad, including reported assassinations of their leaders, were essentially entrusted to the Intelligence Ministry.
Control and management of non-Iranian allied groups was said to have been handed to the IRGC. All of the various subgroups, including what would become the Nasr Command headed by Reza Seifullah, who was in charge of dealing with Iraqi Kurds and Shi'a, reportedly were merged and the Quds Force was formed, although for years it was not publicly discussed.
The rise of Soleimani
Qasem Soleimani replaced Vahidi atop the Quds Force in 1997.
The organization soon began to flourish and extend its influence inside and outside the country. As one of Khamenei's favorite IRGC commanders, Soleimani had established himself as a decisive figure.
He divided the Quds Force into separate departments based on the countries where it operated. Each department had a commander accountable only to Soleimani.
Soleimani also created five new branches of the Quds Force with distinct commanders, including Intelligence, Finance, Politics, Sabotage, and Special Operations. They interacted with each other under a so-called Council of Commanders with Soleimani at its head.
But the Quds Force and its commander mostly avoided the spotlight until civil war broke out in Syria in 2011.
Describing Syria as providing Iran with "strategic depth," Soleimani reportedly convinced Khamenei to intervene in favor of President Assad.
Reports suggested that soon thousands of members of the Quds Force and their trained Iraqi Shi'ite militiamen poured into Syria to fight anti-Assad forces.
In the meantime, under Soleimani's direct supervision, Quds Force specialists reportedly began to train minority Shi'a from Afghanistan and Pakistan to fight in Syria, too.
Upon the 62-year-old Qaani's promotion to Quds Force commander on Jan. 3, Khamenei praised him as "one of the most distinguished Islamic Revolutionary Guards Corps commanders."
Born in Iran's second-largest city, Mashhad, the capital of Khorasan Province, he is an Iran-Iraq War veteran who commanded the Nasr-5 and Imam Reza-21 brigades, the latter of which was eventually expanded into a division.
Qaani has been a member of the Quds Force since its establishment and, during the past two decades, has served as an intelligence official and deputy chief commander under Soleimani.
The U.S. Treasury Department listed Qaani in 2012 as a "specially designated national" for his alleged role in supervising financial disbursements and weapons shipments to the Lebanese Hezbollah and Quds Force elements in both the Middle East and Africa, particularly The Gambia.