Washington: Hundreds of Iraqi militiamen and their supporters hurled stones at the US Embassy in Baghdad for a second day on Wednesday and security forces fired tear gas and stun grenades to drive them away.

Supporters of Iraq’s pro-Iranian force Hashed Al Shaabi began leaving the encircled US embassy in Baghdad on Wednesday but hardliners insisted they would stay, a day after their dramatic incursion into the compound.

The protests mark a new turn in the shadow war between Washington and Tehran playing out across the Middle East.

US President Donald Trump, who faces re-election in 2020, on Tuesday threatened to retaliate against Iran but said later he did not want to go to war.

The protests also cast uncertainty over the continued presence of US troops in Iraq.

Crowds had rallied on Tuesday to protest against deadly US air strikes on militia bases, setting fires, throwing rocks and smashing surveillance cameras. They did not breach the huge embassy’s main compound, however.

Overnight, demonstrators pitched tents and camped outside the embassy walls. On Wednesday morning, they were bringing in food supplies, cooking equipment and mattresses, Reuters witnesses said, suggesting they intended to stay for a long time.

Senior Iraqi army officers had negotiated with those gathered outside the embassy in an attempt to convince them to leave but failed to do so. Washington is putting pressure on Iraqi leaders to ensure the security of its staff.

1. Why are the United States and Iran at odds?

Iran was a close ally of the United States during most of the reign of Shah Mohammad Reza Pahlavi. But Pahlavi was overthrown by the 1979 Iranian revolution and replaced with a Shiite-led Islamic Republic. That November Iranian militants and took about 70 Americans hostage at the US Embassy in Tehran. The hostages were held for 444 days. Iran’s relationship with the United States rapidly deteriorated and has remained strained since.

Some point to US meddling in the Middle East and alliance with Israel and rival Arab powers as justification for Iranian suspicions, while others argue that Iran itself is an expansionist power. Washington and its allies in the Middle East also suspect that Iran is seeking to development a nuclear weapons program.

Both sides have intermittently tried to lower tensions, emphasising that their issues are with the respective governments and not the people of the nation. Protracted negotiations resulted in a 2015 deal between Iran and a number of world powers, including the United States, that sought to place restrictions on Iran’s nuclear program.

2. Why are both the United States and Iran interested in Iraq?

Iraq is Iran’s neighbour. The two nations share a 1,500-long border. Historically, Iraq had formed part of Persia for hundreds of years. Roughly 70 per cent of its population is Shiite, with most of the remaining population Sunni (in Iran, more than 90 per cent of the population is Shiite), though Iran has almost four times the territory as Iraq.

In the modern era, the two countries have had a tense relationship: Iraqi dictator Saddam Hussain invaded Iran in 1980, prompting an eight-year-long war that left hundreds of thousands dead. However, after Saddam’s Sunni-dominated government was toppled by the US-led invasion of Iraq in 2003, Iraq came to be dominated by Shiite political groups, some of whom were allied with Iran.

The United States had been opposed to Saddam’s Baathist government but provided support for Iraq during its war with Iran. Later, after Iraq invaded US ally Kuwait in 1990, it defeated Saddam’s forces in the Gulf War. President George W. Bush’s administration labelled both Iraq and Iran part of the “axis of evil” in a 2002 speech, despite their opposition to each other.

The invasion of Iraq in 2003 ousted Saddam, but US troops remained in the country to combat a violent insurgency. Although the administration of President Barack Obama completed the withdrawal of troops in 2011, troops were redeployed to the country in 2014 to combat Daesh, an extremist Sunni organisation that grew out of the Syrian civil war.

3. What effect did the rise of Daesh in Syria and Iraq have on the US-Iran relationship?

Daesh has its origins in Iraq, but it came to prominence in the chaos in the war in neighbouring Syria that began in 2013 and is still ongoing. At its peak in late 2014, the self-proclaimed caliphate controlled an area the size of Britain and used it as a base to call for attacks on both US and Iranian interests.

Iran and the United States were backing opposing sides in the Syrian war. Tehran viewed Syrian Bashar Al Assad as a key ally in the region, whereas the United States and other Western powers had backed rebels who opposed his regime. But for both, Daesh presented a more pressing problem.

With US air strikes, as well as the intervention of forces loyal to Iran and the Russian military, Daesh ceded the last of its territory earlier this year. However, the end of that fight raised the possibility of new conflict between Iran and the United States. President Trump has taken a critical view of Iran since taking office in 2017.

The tension between the United States and Iran was especially noteworthy in Iraq, where about 5,000 US troops are deployed ostensibly to aid the Iraqi fight against Daesh. Powerful Shiite militias, many allied with Iran, expanded their reach during the battle to liberate land held by Daesh as part of the Popular Mobilisation Forces, a state-sponsored organisation of militias.

4. What relationship does Iran have with groups in Iraq and Syria?

Iran has long been accused of running a network of proxies across the Middle East, using Shiite militias and political parties to undermine rival governments. Often, the exact nature of its relationship with these groups, and the level of autonomy from Tehran, is hard to gauge for outsiders, which critics say gives Iran a degree of plausible deniability for anti-US actions.

In Iraq, there are a variety of Shiite militias. Not all formed at the same time, and they do not have identical interests, but they have had increasing political clout since the battle against Daesh, gaining almost a third of seats of Iraq’s parliament in 2018 elections.

Over the past year, frequent rocket attacks on bases used by US troops in Iraq have led to increasing tension. After the strikes against Kataeb Hezbollah on Sunday, a senior US State Department official had briefed reporters that the blame lay not just with Iran, but also with Iraq. “It is their responsibility to protect us, and they have not taken appropriate steps to do so,” the official said.

The apparent ease with which supporters of Kataeb Hezbollah and other Shiite militias were able to reach the U.S. Embassy, which lies in Baghdad’s secure Green Zone, surprised many observers. On Twitter, Trump tweeted Tuesday that he expected Iraq to protect the embassy.

5. How has President Donald Trump changed the relationship with Iran and Iraq since entering office?

Trump viewed the Obama-era nuclear deal with Iran with suspicion and argued that the previous administration had not done enough to curtail Iranian influence across the region. The president pulled the United States out of the deal in May 2018 and reimposed sanctions on Iran.

The United States has since specifically targeted Iran’s Supreme Leader Ayatollah Ali Khamenei, a religious and political figure who is the ultimate decision-maker in the country; it has also designated the Iranian Revolutionary Guard as a terrorist organisation.

Despite the political and economic pressure on Iran, there has been no indication that support for foreign militias has been curtailed. Iran has been linked to attacks on a Saudi oil facility, as well as foreign tankers in the Gulf. Though most parties to the nuclear deal remain in the agreement, Iran has also started enriching and stockpiling at a higher level than allowed by the deal.

At the same time, tensions between the United States and Iraq have escalated under Trump. In early 2019, Iraq’s President Barham Salih said his country would reject Trump’s idea that the United States could keep American troops in Iraq to “watch” Iran. Iraqis argued that Sunday’s air strikes were an affront to their nation’s sovereignty and broke the status of forces agreement that allows US troops in Iraq.

But Iran’s influence in Iraq is also a point of contention for many: As thousands took to the streets to protest the government this fall, some targeted Iranian interests, even burning down the Iranian Consulate in Karbala in early November.