The US strike in the early hours of January 3 that killed Iranian Major-General Qassem Soleimani has surprised many in the Middle East and beyond. A brazen attack, carried out without permission on the soil of a sovereign nation, it was more reminiscent of the covert operations of Israel's Mossad against its pro-Iranian rivals than an act a global leader with a great stake in the region should engage in.

The assassination of Soleimani is likely to further destabilise a region already rocked by nearly a decade of upheaval.

Soleimani was a figure who loomed large in the Middle East over the last few decades. As a young man, he played a key role in the Islamic revolution and the Iran-Iraq war, and many in Iran will remember him as a war hero, who protected the very identity of the revolution.

Yet outside Iran, he is also understandably widely loathed and considered the chief architect of chaos in the region. After his appointment in 1998 as the head of the Islamic Revolutionary Guard Corps' (IRGC) Quds Force, a division responsible for clandestine military activities abroad, he led many operations in the Middle East and elsewhere.

These interventions almost always came at the expense of Arab nations' sovereignty and the wellbeing of their civilian population, whether it was the US-Iranian pact that enabled the overthrow of Saddam Hussein in Iraq, and which allowed sectarianism to take root, or the deployment of Iranian forces to save the embattled Assad regime in Syria, which led to ethnic cleansing.

As the campaign against the Islamic State of Iraq and the Levant (ISIL, or ISIS) concluded in 2017, the US became more attentive to concerns voiced by Saudi Arabia about Iranian meddling in the affairs of its neighbours, as they found themselves confronting a real and/or imaginary Soleimani in Yemen, as well as Iraq and Syria. Meanwhile, Israel, the US's closest ally, whose security under Trump's administration, become more or less the sole concern of US foreign policy in the region, started to feel the heat of the Iranian presence in Syria and that of Hezbollah, Iran's proxy in Lebanon, which emerged emboldened having fought alongside the Iranians on behalf of Damascus.

As a result, the Trump administration grew less and less patient with Iran's foreign operations led by the Quds Force. This group has appeared increasingly out of control, even to the official Iranian foreign policymakers. The "brief" resignation of Iranian Foreign Minister Mohammad Javad Zarif back in February 2019, came as a direct result of having been sidelined from a meeting between Syrian President Bashar al-Assad and President Hassan Rouhani that took place in Tehran and was attended by Soleimani.

In June 2019, two oil tankers (Norwegian and Japanese-owned) were attacked in broad daylight in the Strait of Hormuz, just one month after four tankers anchored off the UAE coast were targeted. The fact that the attacks on a vessel linked to Japan coincided with the visit of the Japanese Prime Minister to Tehran was seen by some observers as an attempt by the IRGC to undermine Iran's foreign ministry.

As Iran was escalating against the US and its allies in the Middle East, trying to push the Trump administration to relax some of the crippling sanctions it imposed after its withdrawal from the Joint Comprehensive Plan of Action (JCPOA), the US took the unusual step in April 2019 of declaring the IRGC a terrorist organisation which left Soleimani and his Quds Force open to the many counterterrorism options available to Washington and its allies in the region.

Meanwhile, protests erupted in Iraq which changed the regional calculus. Protesters blamed the "muhasasa" or sectarian quota system for triggering sectarian violence across Iraq and allowing certain individuals and groups to enrich themselves while much of the Iraqi population endured economic hardship.

Both Tehran and Washington were surprised in equal measures by the Iraqi people demonstrating against corruption, sectarianism and foreign interference. For both, controlling Iraq suddenly became something that could not be taken for granted.

For Iran, this was particularly problematic given that Iraq has been its main lifeline in the face of the US sanctions and a key link for its manoeuvres in Syria and Lebanon. As a result, it sent Soleimani multiple times to Baghdad to coordinate ways to control the situation with its political and paramilitary allies in the Popular Mobilisation Forces (PMF), including escalating violence against the protesters and hitting back at the US.

The meddling in Iraq that Soleimani was accused of over the past couple of weeks would have most likely passed unpunished if it were not for the opportunity a military response offered to a US president impeached by the House of Representatives and an Israeli prime minister facing trial on corruption charges. Ahead of the November US presidential election, Donald Trump gets to demonstrate his strength in the face of successive failures of his foreign policy initiatives, while Benjamin Netanyahu gets a useful distraction from his legal troubles ahead of the upcoming Israeli parliamentary vote in March.

In the Middle East, however, Trump and Netanyahu's political opportunism will have dire consequences. While both the US and Iran are likely to avoid direct confrontation - which was evident from Washington's choice to stage its attack on Iraqi soil - the latter has already vowed to retaliate.

As Iran concludes its three days of national mourning, its revenge strikes will likely be carried out by proxy forces. It has a wide choice of tactical responses, including bombing, kidnapping and even cyber security attacks. This could involve operations in Iran's immediate neighbourhood similar to those carried out in September on Saudi oil installations or disruption of oil shipping routes in the Gulf. Attacks on US positions in Iraq, Syria, Lebanon and potentially Afghanistan are also likely.

While the assassination of Soleimani demonstrated that neither the US nor Iran is willing to respect Iraqi sovereignty, its real political fallout is likely to result in the weakening of the Iraqi protest movement which has, for the first time, unified Iraqis around a nationalist, non-sectarian platform and has threatened Iranian influence in the country and called for the expulsion of US troops.

Now, the unfolding events can be exploited by politicians to advocate for the continued role of Iran in Iraqi politics. In the current atmosphere of shock and emotion, there is little appetite for diplomacy.

This is unfortunate because even this week speculation abounded over the secret willingness of both parties to re-enter negotiations over the nuclear deal. Given the statements made by some European countries, including Germany, justifying the US attack, it is now possible that Iran leaves the JCPOA entirely or at least announces a significant increase in enrichment of uranium.

In coming days, it is vital that the voices of calm and diplomacy win out over those calling for escalation and confrontation, to avert a regional war. Qatari Foreign Minister Mohammed bin Abdulrahman Al Thani's visit to Tehran on January 4 and his call for "finding a peaceful solution to reduce the tension" is promising.

Qatar enjoys the respect and trust of both Iran and the United States and has a direct interest in defusing the tension, given it hosts the largest US airbase in the region and shares gas fields with Iran.

For de-escalation efforts to be successful, however, the US must refrain from other targeted killings in Iraq. In addition, the US and Iran must not heed the calls for violence and revenge from regional warmongers who stand to gain from their direct confrontation.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.