BEIRUT (Reuters) - President Donald Trump is expected to pull the United States out of the Iran nuclear agreement on May 12. Tehran signed the Joint Comprehensive Plan of Action, with China, France, Germany, Russia, Britain, and the United States in 2015.

Iran agreed to curbs on its nuclear program in exchange for the lifting of some sanctions. But the withdrawal of the United States will probably sink the deal. If that happens, Iran could retaliate by undermining the interests of Washington and its allies in the Middle East.

Here are some possible scenarios:

IRAQ

When Islamic State seized much of Iraq in 2014, Iran was quick to support Baghdad. Iran has since helped arm and train thousands of Shi’ite fighters in Iraq. These Popular Mobilization Forces (PMF) are also a significant political force.

If the deal falls through, Iran could encourage PMF factions who want the U.S. to leave Iraq to step up rhetorical, and maybe military, attacks against American forces.

These could be rocket, mortar and roadside bomb attacks not directly linked to a specific Shi’ite militia, which would allow Iran to deny it had changed its position of avoiding direct conflict with U.S. forces in Iraq.

SYRIA

Iran and paramilitary allies such as Lebanon’s Hezbollah have been involved in Syria’s war since 2012. Iran has armed and trained thousands of Shi’ite paramilitary fighters to shore up the government. Israel says Iran has recruited at least 80,000 Shi’ite fighters.

Iran’s presence in Syria has brought Tehran into direct conflict with Israel for the first time, with a series of high-profile clashes in recent months. Israeli officials say they will never let Tehran or Hezbollah establish a permanent military presence in neighboring Syria.

If the nuclear deal falls through, Iran will have little incentive to stop its Shi’ite militia allies in Syria from carrying out attacks against Israel.

FILE PHOTO: Iranian President Hassan Rouhani attends a meeting with Muslim leaders and scholars in Hyderabad, India, February 15, 2018. REUTERS/Danish Siddiqui/File Photo

Iran and the forces it controls in Syria could also cause trouble for about 2,000 U.S. troops deployed in northern and eastern Syria to support Kurdish-led fighters.

A top adviser to Iran’s Supreme Leader said in April he hoped Syria and its allies would drive U.S. troops out of eastern Syria.

LEBANON

In 2006, Hezbollah fought Israel to a standstill in a 34-day border war. According to Israeli and U.S. officials, Iran is now helping Hezbollah build factories to manufacture precision-guided missiles or refit longer-range missiles with precision guidance systems.

Israeli forces have repeatedly attacked Hezbollah in Syria where the group is leading many of Iran’s Shi’ite militia allies. The rhetoric between Israel and Iran has ramped up in recent weeks. Though Hezbollah and Israel say they are not interested in conflict, the tensions could easily spill over into another Lebanon war.

Hezbollah said last year that any war waged by Israel against Syria and Lebanon could draw thousands of fighters from countries including Iran and Iraq, indicating that Shi’ite militias could come to Lebanon to help Hezbollah.

Hezbollah is also a major political force in Lebanon, and may strengthen its position at elections on May 6. For the moment, the group is working with its political opponents, notably Prime Minister Saad al-Hariri, who is backed by Western governments.

But if the nuclear deal falls through, Iran could pressure Hezbollah to isolate its opponents, a development experts believe could destabilize Lebanon.

“Hezbollah literally controls Lebanese politics,” said Hilal Khashan, a professor of political studies at the American University of Beirut. “If they do that, it would be sheer harassment.”

YEMEN

Iran has never acknowledged direct military involvement in Yemen. But U.S. and Saudi officials say it is supplying rebel Houthi fighters with missiles and other arms. The Houthis have fired missiles at Riyadh and Saudi oil facilities, saying they are retaliating against air raids on Yemen.

Iran and Saudi Arabia are locked in a regional power struggle. Supporters of the Iran nuclear deal say it has prevented the conflict from descending into open warfare. If the deal falls through, Iran could increase support for the Houthis, possibly provoking a military response from Saudi Arabia and Gulf allies such as the United Arab Emirates.

“I’m not ruling out Iranian support to the Houthis,” said Khashan

TREATY

Iran also has options directly related to its nuclear program. Iranian officials have said that one option they are examining is to withdraw completely from the Non-Proliferation Treaty (NPT), an agreement designed to stop the spread of nuclear weapons. Supreme Leader Ayatollah Ali Khamenei says the country is not interested in developing nuclear weapons. But if Iran withdraws from the NPT, it will set off alarm bells globally.

“This would of course be a disastrous course for the Islamic Republic, as it will find itself isolated,” said Ali Alfoneh, a senior fellow at the Atlantic Council.

Even if Iran does not withdraw from the NPT, it has indicated that it will probably ramp up enrichment of uranium, strictly limited under the deal to help allay fears it could be used to produce atomic bomb material. Under the current deal, Iran’s enrichment levels must remain around 3.6 percent. Iran stopped producing 20 percent enriched uranium and gave up the majority of its stockpile as part of the 2015 agreement.

Uranium refined to 20 percent fissile purity is beyond the 5 percent normally required to fuel civilian nuclear power plants, although short of highly enriched, or 80 to 90 percent, purity needed for a nuclear bomb.

This week, the head of Iran’s Atomic Energy Organization, Ali Akbar Salehi, said Iran was able to enrich uranium to a higher level than it could before the deal.

Iran’s actions may be influenced by the extent to which the other signatories to the deal respond to U.S. withdrawal, according to analysts.

That will depend on: the extent to which France, Germany and Britain insist that their companies can continue to do business with Iran under what is an international agreement ratified unanimously by the UN Security Council; the level of diplomatic support for Iran from Russia, its partner in Syria; and how much China wishes to bind Iran into its Belt and Road foreign trade and investment initiative.

There will be a test of wills if the Trump administration restores sanctions and threatens violators with being shut out of the U.S. banking system. Of the other signatories only China, the biggest buyer of Iranian oil, is able to brush this off.