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 U.S. forces and American allies.

It’s a network that was developed over nearly two decades by Gen. Qassem Soleimani, who was killed along with senior Iraqi militants in a U.S. airstrike near Baghdad’s international airport overnight. He 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 Tehran.

Iran has used such groups in the past to strike its regional foes, including Israel, and could mobilize them if the killing of 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 U.S. after the airstrike, calling Soleimani the “international face of resistance.”

Here’s a look at Tehran’s allies in the Mideast:

IRAQ MILITIAS

Iran has trained, financed, and equipped Shiite militias in Iraq that battled U.S. forces in the years after the 2003 invasion and remobilized to battle the Islamic State group a decade later.

The groups include Asaib Ahl al-Haq, Kataeb Hezbollah and the Badr Organization, all three led by men with close ties to 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 Soleimani. The U.S. blamed his group for a rocket attack on an Iraqi military base last week that killed a U.S. contractor. It responded with airstrikes over the weekend that killed 25 of his fighters.

The militias fall under the umbrella of Iraq’s Popular Mobilization Forces, 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.

U.S. forces and the PMF fought side-by-side against Islamic State militants after Iraq’s parliament invited the U.S. back into the country in 2014. But in recent months militia leaders have called on U.S. troops to leave again, threatening to expel them by force if necessary.

___

HEZBOLLAH

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 HOUTHIS

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 U.N. experts has accused Tehran 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.

___

GAZA MILITANTS

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 Tehran 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 Tehran’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.