A decades-long battle: The Iran-US rivalry explained
Lebanon and Syria have been key battle-grounds between the two sides, but the growing dominance of Tehran-backed militias in Iraq - and the presence of US troops there - have made the country a theatre of competition between the two sides.
On Tuesday evening, Iran fired 22 rockets at two bases in Iraq hosting American soldiers. No American soldiers were killed in the attack, due to the bases being given advanced warnings about the strikes.
The action was in response to the US killing of Qasem Soleimani, head of the Iranian Revolutionary Guards Corps' (IRGC) expeditionary wing, the Quds Force, a commander at the centre of Tehran's incursions in Syria, Iraq and other countries in the Middle East.
Tensions between the two countries worsened with the withdrawal of the US from a nuclear deal with Iran, under President Donald Trump.
Iran has been angered by a series of new US sanctions that aim at crippling its banking industry and oil exports. In response, it is suspected of being behind a series of attacks on Gulf shipping and Saudi oil facilities designed to coerce US allies to lobby Washington to backtrack from its 'maximum pressure' policy.
How did this start?
Iraq has become the main battleground in a proxy war between Tehran and Washington, a country both sides have invested huge amounts of manpower and resources to prevent the other from gaining dominance.
The rivalry between the two countries dates back to the 1979 Islamic Revolution in Iran and the subsequent seizure of the US embassy in Tehran, two seismic events that had huge ramifications on Washington's policy in the Middle East.
But the Iranian hostility to the US (and Britain) can be traced to a CIA-backed coup against its democratically elected Prime Minister Mohammad Mosaddegh in favour of a regime friendly to Western interests. It was that same regime that was deposed by the Islamic Revolution.
Iran subsequently turned from a key regional ally for the US to enemy number one almost overnight and when the Iran-Iraq War erupted there was little surprise as Washington threw its support behind Baghdad, despite Saddam Hussein's close ties to the USSR.
The gruelling conflict cost hundreds of thousands of lives on both sides with Shia Iran largely fighting alone and Iraq backed by the US, Sunni Arab Gulf states and other allies. The US' support for Baghdad during the bloody war, which Tehran believes Iraq started, has been a fundamental part of further Iranian animosity towards Washington.
Iran's confrontation with Israel, the US and Gulf adversaries continued through the 1980s with attacks on Washington's interests in the region through Tehran-backed proxy militias, such as Hezbollah in Lebanon and other shadowy groups.
The US-led liberation of Kuwait from Iraqi forces and election of moderate President Mohammed Khatami saw relations between the two sides improve but things came to a head again in 2003 with the US-led invasion of Iraq.
The overthrow of Saddam Hussein and President George W. Bush's Axis of Evil speech, where Iran was named among Washington’s arch enemies, heightened fears that Tehran might be next.
Iran contributed to the bloody sectarian war in Iraq by organising, funding and directing Shia militias, some of them commanded by Iraqis groomed by Tehran during their exile.
Then in Syria's civil war, Quds Force commander Qasem Soleimani was tasked with supporting Syrian dictator Bashar Al-Assad.
The Iranian general flew thousands of foreign mercenaries into Syria and built a huge militia force, including the Afghan-dominated Fatimayoun Brigade, after the Syrian army was hit by mass defections and desertions.
Assad's regime is responsible for the majority of the hundreds of thousands killed in the Syria war and Iranian efforts are believed to have been key to his survival.
Both the US and Iran were forced to confront a common enemy with the rise of the Islamic State group in 2014, but the battle between the two sides for dominance in Iraq continued.
Iran marshalled a number of Shia militia during this fight, under the umbrella of the Popular Mobilisation Forces (PMF), to increase their hold over the Iraq military apparatus and government.
Since the defeat of IS, this expansionism has continued.
American troops based in Iraq have become regular targets of the Popular Mobilisation Forces (PMF), but no US citizens were killed until an American contractor died in December. Iran was also accused of orchestrating an attack on the US embassy in Baghdad in December by militia fighters.
The response from Washington was to target the mastermind of Iran's military presence in Iraq, Qasem Soleimani, leading to reprisal attacks by Tehran on two bases in Iraq hosting American troops.
Iran's military power is split between the conventional armed forces and the IRGC.
Its military is concentrated on the defence of Iran, with conventional and non-conventional methods - such as attacking shipping through attack boats.
The IRGC's largely directs Iran's asymmetrical battle against the US and its regional allies, while maintaining the survival of the regime through its feared Basij paramilitaries.
It has built a powerful network of militias and proxy forces in Lebanon, Syria, Iraq and Yemen, many inspired by the doctrine of Khomeinism and have launched scores of attacks on Israeli, US and Gulf military and civilian targets.
Iran's military presence in the region is opaque, but since the start of the Syrian war in 2011 the IRGC has grown tremendously.
Israel has launched hundreds of airstrikes on Iranian militia positions and supply routes in Syria throughout the war, particularly in the southwest of the country, and increasingly, the east and Iraq. A main concern for Israel is the build-up of militia fighters and the suspected transit of missiles into the country.
US military presence
The US has a number of key military bases in the region and around 50,000 armed forces personnel. The US also has around 15,000 troops in Afghanistan.
Key US military installations in the region include a number of army camps in Kuwait and other countries, the Al-Udeid airbase in Qatar, Al-Dhafra airbase in Abu Dhabi, while the US Fifth Fleet is anchored in Bahrain.
The US has around 5,000 military personnel in Iraq, including Erbil and Ain Al-Asad bases which were targeted by Iranian missiles overnight Tuesday.
The 600 US soldiers in Syria are mostly based in Al-Tanf, an isolated base in the far south of the country, close to the border of Iraq and Jordan.
It was built to help opposition operations against the Islamic State group in the Syrian Desert region but it is now mainly focused with keeping in nearby Iranian militias in check.
Analysts have been pondering the US' next move and whether the Iranian missile strike is one of a series of measures planned by Tehran or a one-off act of retaliation.
Most US allies over the past few days have appealed for calm, amid a storm of fiery rhetoric coming from Iranian politicians and media.
On Wednesday, Trump spoke about the strikes saying that no Americans or Iraqis were killed and that Iran appeared to be "stepping down".
The question is now, whether this is the end of Iranian retaliation.
Follow us on Twitter and Instagram to stay connected