JERUSALEM (AP) - If Iran decides to follow through on its vow of harsh retaliation for the killing of its top general, it can call upon heavily armed allies across the Middle East that are within easy striking distance of US forces and American allies.
It's a network that was developed over nearly two decades by General Qassem Soleimani, who was killed along with senior Iraqi militants in a US airstrike near Baghdad's international airport overnight.
Gen Soleimani enjoyed the fierce loyalty of tens of thousands of fighters in Iraq, Syria, Lebanon, Yemen and the Gaza Strip who received aid, arms and training from Teheran.
Iran has used such groups in the past to strike its regional foes, including Israel, and could mobilise them if the killing of Gen Soleimani ignited an armed conflict - dramatically expanding the battlefield.
Iran's Supreme Leader Ayatollah Ali Khamenei warned that a "harsh retaliation is waiting" for the US after the airstrike, calling Gen Soleimani the "international face of resistance."
Here's a look at Teheran's allies in the Middle East:
Iran has trained, financed, and equipped Shiite militias in Iraq that battled US forces in the years after the 2003 invasion and remobilised to battle the Islamic State in Iraq and Syria (ISIS) a decade later.
The groups include Asaib Ahl al-Haq, Kataeb Hezbollah and the Badr Organisation, all three led by men with close ties to Gen Soleimani, the leader of Iran's elite Quds Force.
The leader of Kataeb Hezbollah, Abu Mahdi al-Muhandis, was killed in the strike that felled Gen Soleimani. The US blamed his group for a rocket attack on an Iraqi military base last week that killed a US contractor. It responded with airstrikes over the weekend that killed 25 of his fighters.
The militias fall under the umbrella of Iraq's Popular Mobilisation Forces (PMF), a collection of mostly Shiite militias that were incorporated into the country's armed forces in 2016. Together they number more than 140,000 fighters, and while they fall under the authority of Iraq's prime minister, the PMF's top brass are politically aligned with Iran.
US forces and the PMF fought side-by-side against ISIS militants after Iraq's Parliament invited the US back into the country in 2014. But in recent months, militia leaders have called on US troops to leave again, threatening to expel them by force if necessary.
The militia, whose Arabic name translates into "Party of God," was established by Iran's Revolutionary Guard during Lebanon's civil war in the 1980s. Today it is among the most effective armed groups in the region, extending Iran's influence to Israel's doorstep.
Hezbollah was formed to combat Israel following its invasion of Lebanon in 1982. It waged an 18-year guerrilla war against Israeli forces, eventually forcing them to withdraw from Lebanon in 2000. Six years later, it battled Israel to a bloody stalemate in a month-long war.
Today, the group has an arsenal of tens of thousands of rockets and missiles that can reach deep into Israel, as well as thousands of highly disciplined and battle-hardened fighters. Hezbollah has fought alongside government forces in Syria for more than six years, gaining even more battlefield experience and expanding its reach.
At home, the group's power exceeds that of the Lebanese armed forces, and it is part of a political alliance that now leads the government and Parliament.
Hezbollah has said it is not seeking another war with Israel, and it is not likely to join in any regional confrontation - at least not in the early stages - unless provoked. Hezbollah has lost hundreds of fighters in Syria, exacting a heavy toll on the Shiite community from which it draws most of its support.
Yemen's Shiite rebels, known as Houthis, swept down from the north and captured the capital, Sanaa, in 2014. A Saudi-led coalition entered the conflict on the side of the government the following year. The war has since killed tens of thousands of people and generated the world's worst humanitarian crisis.
Saudi Arabia views the Houthis as an Iranian proxy, and along with Western nations and UN experts has accused Teheran of providing arms to the rebels, including the long-range missiles they have fired into Saudi Arabia. Iran supports the rebels but denies arming them.
The Houthis have given up little ground since the coalition entered the war, and have targeted the Saudi capital, Riyadh, with long-range missiles. Last year they claimed a drone attack that shut down a major oil pipeline in Saudi Arabia, which responded with airstrikes on Yemen's rebel-held capital that killed civilians.
Iran has long supported Palestinian militant groups, including Gaza's Hamas rulers and particularly the smaller Islamic Jihad group.
Hamas fell out with Iran after the 2011 Arab Spring uprisings, losing millions of dollars in monthly assistance, but Teheran is said to have continued its military support to Hamas' armed wing.
Tensions have run high in Gaza since Israel's targeted killing of an Islamic Jihad commander last month, which set off a brief two-day bout of fighting. Hamas, which has been negotiating a period of calm with Israel through Egyptian mediators, stayed on the sidelines.
Hamas is in a severe financial crisis and appears to get most of its aid from Qatar, making it less likely that it would rally to Teheran's side in a regional conflict. But Islamic Jihad, still smarting from the recent fighting, could be keen to join in any regional conflict by firing rockets.