Iran's Islamic Revolution Guard Corps (IRGC) was set up 40 years ago to defend the country's Islamic system, and to provide a counterweight to the regular armed forces.
It has since become a major military, political and economic force in Iran, with close ties to the Supreme Leader, Ayatollah Ali Khamenei, and many other senior figures.
The IRGC is estimated to have more than 190,000 active personnel, boasts its own ground forces, navy and air force, and oversees Iran's strategic weapons.
It also controls the paramilitary Basij Resistance Force, which has helped suppress domestic dissent, and the powerful bonyads, or charitable foundations, which run a considerable part of the economy.
The IRGC exerts influence elsewhere in the Middle East by providing money, weapons, technology, training and advice to allied governments and armed groups through its shadowy overseas operations arm, the Quds (Jerusalem) Force.
The US accuses the Quds Force of supporting terrorist organisations and being responsible for attacks in Iraq and elsewhere in the Middle East that have resulted the deaths of hundreds of American and allied military personnel.
On 3 January 2020, the US killed the Quds Force's powerful commander, Major General Qasem Soleimani, in a drone strike in Baghdad. The defence department said he had orchestrated a rocket attack in Iraq that killed an American contractor and was "actively developing plans to attack" American diplomats and troops in the region.
Ayatollah Khamenei called for "forceful revenge", raising fears of a major conflict.
Guardians of the Revolution
Before the 1979 revolution, Shah Muhammad Reza Pahlavi relied on military might to ensure national security and to safeguard his power.
Afterwards, the new Islamic authorities, headed by Ayatollah Ruhollah Khomeini, realised they too needed a powerful force committed to consolidating their leadership and revolutionary ideals.
The clerics therefore produced a new constitution that provided for both a regular Military (Artesh), to defend Iran's borders and maintain internal order, and a separate Guard Corps (Sepah-e Pasdaran), to protect the Islamic system.
In practice, these roles have often overlapped, with the IRGC also helping to keep public order and developing its own army, navy and air force.
Despite having an estimated 230,000 fewer troops than the regular military, the IRGC is considered the dominant military force in Iran and is behind many of the country's key military operations. The IRGC's overall commander, currently Major General Hossein Salami, and other senior officers routinely advise the supreme leader.
The IRGC navy is tasked with patrolling the strategically important Strait of Hormuz, a narrow waterway connecting the Gulf to the Indian Ocean through which 20% of the world's oil supply passes.
The force's small boats have intercepted US warships that it says have approached Iran's territorial waters, and detained or diverted international shipping.
The IRGC's air force, which does not generally operate combat aircraft, is meanwhile responsible for Iran's missiles.
The US has said Iran has the largest ballistic missile force in the Middle East, with more than 10 ballistic missile systems either in its inventory or in development, and a stockpile of hundreds of missiles.
In 2018, ballistic missiles were fired at an Iranian Kurdish rebel group based in northern Iraq and at Islamic State group positions in Syria.
But perhaps the most prominent IRGC entity in recent years has been the Quds Force, which Iran's government is said to use to implement its foreign policy goals.
Iran has acknowledged the role of the Quds Force in the conflicts in Syria, where it has advised forces loyal to President Bashar al-Assad and armed thousands of Shia Muslim militiamen fighting alongside them, and Iraq, where it has backed a Shia-dominated paramilitary force that helped defeat IS.
The conflicts turned the once-reclusive commander, General Soleimani, into a something of celebrity in Iran.
The Trump administration has alleged that the Quds Force is also "Iran's primary mechanism for cultivating and supporting" US-designated terrorist groups across the Middle East - including Lebanon's Hezbollah movement and Palestinian Islamic Jihad - by providing funding, training, weapons, and equipment.
The Quds Force has also been accused by the US of plotting or carrying out terrorist attacks, directly or through its proxies, in five out of seven continents.
In 2011, the Quds Force was allegedly involved in a plan to assassinate the Saudi ambassador to the US by bombing a restaurant in Georgetown. And last year, a court in Germany convicted a Quds Force operative of spying on the former head of a German-Israeli group and people close to him.
Such alleged activities prompted the United States in April 2019 to designate the IRGC as a "foreign terrorist organisation" - the first such designation of an official military force. At the same time, the US tightened its sanctions on Iran's oil exports, further weakening its economy.
In response, Iran began a counter-pressure campaign. The IRGC's forces shot down a US military surveillance drone over the Strait of Hormuz in June and seized a British-flagged tanker in the same area the following month.
The US also accused Iran of being behind a series of explosions that damaged six tankers in the Gulf of Oman in May and June; drone and cruise missile attacks on two Saudi oil facilities in September; a rocket attack on an Iraqi military base used by US troops on 27 December that killed the American contractor. Iran denied any involvement.
There was a serious escalation in the confrontation between the US and Iran following the rocket attack.
On 29 December, the US carried out air strikes on five bases in Iraq and Syria associated with the Iran-backed Iraqi militia that it believed fired the rockets, Kataib Hezbollah. The strikes killed at least 25 militia fighters and sparked violent protests outside the US embassy in Baghdad.
Five days later, a US Reaper drone fired missiles at a convoy leaving the city's international airport, killing General Soleimani and several militia leaders, including Kataib Hezbollah chief Abu Mahdi al-Muhandis.
The IRGC also has a powerful presence in Iran's civilian institutions.
It controls the Basij Resistance Force (Mobilisation of the Oppressed), an Islamic volunteer militia of about 100,000 men and women. The Basij are loyalists to the revolution who are often called out onto the streets to use force to dispel dissent.
The IRGC and Basij were prominent in putting down the mass opposition protests that erupted in 2009 after the disputed re-election of then President Mahmoud Ahmadinejad. Dozens of opposition supporters were killed and thousands detained.
The IRGC's popular power, combined with the strong support of Ayatollah Khamenei, has made it a key player in Iranian politics.
Former IRGC officers occupy or have occupied influential positions in government, parliament and other bodies, among them Mr Ahmadinejad, parliamentary speaker Ali Larijani, and Mohsen Rezaei, secretary of the Expediency Council.
Serving IRGC officers also frequently criticise government policies.
The former overall commander, Major General Mohammad Ali Jaafari, openly opposed the concessions made by moderate President Hassan Rouhani during the negotiations that led to Iran's 2015 landmark nuclear deal with world powers.
The IRGC is also thought to control around a third of Iran's economy through a series of subsidiaries and trusts.
Apart from military industries, the IRGC is active in housing development, dam and road construction, oil and gas projects, food, transportation and even educational and cultural activities.
The IRGC's engineering wing - Khatam-ol-Anbia (Seal of the Prophet), also known by an acronym, Ghorb - is reported to have tens of thousands of employees and has been awarded billions of dollars of construction and engineering contracts.
President Rouhani, who has faced protests over the state of Iran's economy, has on many occasions criticised the IRGC's sprawling business empire. He once called it a "government with a gun" that had "scared" the public sector.