The decision of US President Donald Trump to kill Qasem Soleimani has left the international community reeling.
The US killed an Iranian general in Iraq -- a country where it has kept a constant military presence since the 2003 invasion to overthrow Saddam Hussein, reports CNN.
However bad relations between the US and Iran had become under Trump, the killing of a military official by drone strike caught everyone, including America's closest allies, off guard.
Iran's decision to retaliate by firing missiles at US targets in Iraq has left those with an interest in the region holding their breath. Iran may claim it doesn't want war, but also says that any retaliation from Trump would be considered an escalation and responded to as such, reports CNN.
Below is a detailed account on everything you need to know to understand this developing crisis.
What's the background to this crisis?
The weeks leading to Soleimani's death had been rocky in Iraq. "Since the start of October, there'd been a tense standoff between Iraqi protestors [and the Iraqi government], opposing the Iran-backed Iraqi establishment," says Chris Doyle, director of the Council for British-Arab Understanding, an independent think tank promoting conflict resolution, civil society and human rights in the Middle East.
For months, thousands of Iraqi citizens have protested against government corruption and growing Iranian interference in Iraq's political establishment.
Security forces have cracked down on protesters, killing hundreds and injuring thousands.
Days before Trump ordered the drone strike which killed Soleimani, Hundreds of pro-Iranian protestors attempted to storm the US embassy in Baghdad, scaling the walls and forcing the gates of the compound. They were protesting US airstrikes on facilities in Iraq and Syria which the Pentagon claims were linked to pro-Iranian militias responsible for attacking US service personnel in Iraq.
Doyle believes that the storming of the US embassy was part of a wider Iranian strategy to distract Iraqis from the months of protests, starting in October, against Iranian interference in Iraq.
"The protests had obviously worried the Iranians," says Doyle. "I think, many of activities including, the embassy assault was to distract from the protests."
Why wasn't Soleimani targeted before?
Trump was not the first US president to consider what to do about Soleimani.
Dr Leslie Vinjamuri, director of the US and Americas program at Chatham House, explains that "previous administrations had considered the possibility of killing Soleimani, and they made a very clear choice not to. While he's clearly threatening to America's interests and reprehensible, they didn't think that the cost would be worth it."
Soleimani was in charge of managing Iran's militias abroad, which in the case of Iraq, meant acting as a direct challenger to the US for being the most significant foreign power in the country.
Doyle explains that "the attraction of Iraq is that it is the only country in the Arab world with oil, water and human resources. But since the 2003 war, external powers have been feasting on the carcass of the Iraqi state."
For some time, Iran has handled its priorities in Iraq better than the Americans, whose influence is deemed to be on the decline. "This assassination has merely accelerated the demise of US influence in this region and beyond to the benefit of Iran itself, Russia and China," says Professor Arshin Adib-Moghaddam at the School of Oriental and African Studies, University of London.
One of the reasons Iran has so often wrong footed the US is that the two nations have had no diplomatic relations at all since 1979. And as Vinjamuri says, this has created "an absolute absence of knowledge and understanding" of the Iranian view.
Why are US-Iran relations so poor?
Two key moments have shaped the entire US-Iran conflict.
In 1953, the CIA helped orchestrate a military coup, which overthrew the then democratically-elected Iranian leader, Mohammad Mossadegh. At the height of Cold War tensions, Mossadegh pledged to nationalize Iran's oil fields, which was widely seen as both popular in Iran and a victory for the then USSR. The British, who controlled the oil fields, enlisted the help of the CIA to overthrow Mossadegh.
After toppling Mossadegh, the US supported Iran's monarch Mohammad Reza Pahlavi to rule as Shah of Iran.
Firmly in power, the Shah forced critics of his modernization reforms like Ayatollah Ruhollah Khomeini into exile in Iraq, and developed a reputation as an authoritarian playboy.
In 1979, the party came to an end. The Iranian revolution ended the Shah's rule. Secular protestors opposed his authoritarianism, while Islamist protestors opposed his modernization agenda. Khomeini returned from exile and formed an Islamist government.
Something that united many Iranians was a distrust of the US. This distrust wasn't helped when in October 1979, it was reported that the Shah had been allowed to enter the US for cancer treatment. This led to weeks of demonstrations outside the US embassy in Tehran.
In November of that year, protestors stormed the embassy and took dozens of American hostages. They demanded the extradition of the Shah to Iran, and received Khomeini's support.
The Iran hostage crisis lasted 444 days. This was the beginning of the end. Over a period of time, the US cut all diplomatic ties while imposing crippling financial sanctions. The crisis only stopped when Iran agreed to release the hostages in exchange for Iranian assets being unfrozen.
The bad blood led to more conflict between the two -- including the US backing neighboring Iraq in its decision to go to war with Iran during the hostage crisis in 1980.
How did Iraq get sucked into this?
Iraq saw its own coup in 1958, which overthrew the monarchy and created the Iraqi Republic. This led to the eventual leadership of the Ba'ath party in 1968 and Saddam Hussein in 1979, which lasted until the US-led invasion removed him from power in 2003.
While there was a lot for the US to dislike about the Ba'athists, the memory of the hostage crisis was fresh. This meant that for most of the 1980s, the US "played Iraq and Iran off against one another, in an act of dual containment," says Doyle. It did this by backing Iraq in the war while simultaneously selling arms to Iran, in what is now referred to as the Iran-Contra affair.
That all changed in 1990, when Hussein invaded Kuwait. The US stood by its Gulf allies and led the response to Iraq, in what is now known as the First Gulf War.
Over the following decade, the West grew suspicious of Hussein's ambitions and the fear that he was developing weapons of mass destruction. After the September 11 attacks in 2001, Hussein's Iraq was deemed too much of a security risk, and the US invaded.
After Hussein was gone, Iraq was an ungovernable mess. The US strategy of treating Iraq in sectarian terms -- encouraging people from all groups to participate in government -- created division and failed to bring the country together.
The Shias, who had been politically excluded under Hussein's Sunni rule, seized the opportunity and dominated the post-war Iraqi government. But the state was shattered, leaving it open to interference from Iran, China, Russia and making it a breeding ground for terrorist groups.
It also left Iraq to become a perfect venue for a proxy war between Iran and America. Doyle says that the Iraqi population is not enamored with either, and incidents like the killing of Soleimani "highlight the complete absence of sovereign control," as two more powerful actors take charge.
Why is the international community so worried?
First, there is a real concern among America's allies about Trump's recklessness and unpredictability.
"This decision to kill Soleimani was ad-hoc, probably in order for Trump to position himself more firmly as a macho President who stands up against international challengers," says Adib-Moghaddam. "In the US, war still garners votes, being tough is cool."
Given that Trump will face election in November of this year, this is a serious concern. While Adib-Moghaddam doesn't believe there will a conventional war, he does fear "a protracted tit for tat between Iran and its powerful regional allies and the United States and its camp."
Vinjamuri says that however deplorable Soleimani's actions against the US and its allies might have been, his killing could set a "precedent for others who might eventually have the capability to execute similar types of attacks. Drone strikes as a mechanism to kill state officials is a very grave precedent."
For its part, Iran has several ways of responding. First, directly, as we have seen in the strikes it carried out against US targets in Iraq.
Iranian-backed militias also operate in many countries where the US has strategic interests in the Middle East, including Syria. And it could cause the US an almighty headache by enriching uranium beyond the limits agreed in the nuclear deal.
We know that the Iranians intend to stop complying with the deal agreed under the Obama administration and under the auspices of the European Union. Trump campaigned in 2016 on ending the US participation.
The problem for those wanting the situation to diffuse is that the only party that seems to have the international credibility to get things back on track, the EU, can't do much about this conflict, other than creating a forum for Iran and the US to talk. And at the moment, there is very little chance of that happening.