Beirut — President Donald Trump’s assertive new strategy toward Iran is already colliding with the reality of Tehran’s vastly expanded influence in the Middle East as a result of the Islamic State war.

The launch of the strategy signaled an important shift in U.S. Mideast policy away from an almost exclusive focus on fighting the Islamic State to an effort that also pushes back against years of Iranian expansion in the region.

But the strategy offers no specifics for how to confront Iran’s pervasive presence on the ground in Iraq, Syria and beyond, raising questions over how easy it will be to push back against Iranian influence without triggering new conflicts.

The difficulty of changing tack on what has amounted in recent years to a tacit alliance with Iran in Iraq for the purpose of the fighting the Islamic State was evident this week in a sharp rebuke by Iraqi Prime Minister Haidar al-Abadi to Secretary of State Rex Tillerson’s call for Iranian-backed Iraqi militias to “go home.”

The militias are “part of the Iraqi institutions,” Abadi responded in a statement. “The Hashd al-Shaabi should be encouraged because they are the hope of the country and the region,” referring to the coalition of militia known as the Popular Mobilization Forces.

One of Iraq’s most powerful militia leaders went further, saying in a tweet that it is the Americans who should go home.

“Your armed forces have to prepare from this point immediately and without any delay to leave our homeland Iraq after the end of the excuse of the ISIS presence,” said Qais al-Khazali, who heads the Iran-backed Asaib Ahl al-Haq militia and was imprisoned for two years by U.S. forces for his role in organizing an attack that killed five U.S. soldiers in 2006. ISIS is another name for the Islamic State.

The rising tensions risk a return to the era of proxy wars that prevailed in the middle of the last decade, when Iranian-backed militias blew up American troops and U.S. and Iranian-backed allies kidnapped one another’s operatives on the streets of Baghdad — or even in the 1980s, when Americans were driven out of Beirut by suicide bombings and the kidnapping of dozens of Western hostages by a group allied to the Iranian-backed Hezbollah movement.

The tensions also risk complicating the final stages of the war against the Islamic State, which has now been mostly confined to a desert stretch of highly strategic territory spanning the border between Syria and Iraq.

In the three years since the United States intervened in both countries to roll back the Islamic State, Iran has dispatched tens of thousands of allied militia fighters to the battlefield, asserting its presence in vast swaths of territory not previously regarded as within Iran’s traditional orbit of influence.

Iranian-backed Shiite militias have fanned out into the Sunni and Christian areas of northern and western Iraq that were freed from Islamic State control — often with the help of U.S. airstrikes — and now they are in the process of aiding efforts by the Iraqi government to reclaim territory that has been controlled by U.S.-allied Kurds since as long ago as 1991. Alongside the Iraqi army, the militias are now moving toward the small Kurdish-controlled border crossing of Fishkhabour, through which the U.S. military sends its military support to Kurds engaged in the fight against the Islamic State in Syria. A change in control of the crossing could jeopardize the ability to supply U.S. troops and allies for the fight in Syria, where they are competing with Iran and its allies for control of the last significant pocket of territory controlled by the militants.

Iran has already asserted itself as a major player in Syria by supplying, arming and training the tens of thousands of militia fighters that have proved instrumental in securing President Bashar al-Assad’s hold on power.

Alongside Assad’s army, they are now in a race with the U.S.-backed Syrian Democratic Forces to capture the last stretch of Islamic State territory in eastern Syria. There they hope to link up with their Iraqi allies to secure a land bridge between Tehran and their Lebanese ally Hezbollah in Beirut, securing an arc of continuous Iranian influence that stretches to the Mediterranean.

Tillerson on Thursday disputed suggestions that Syria has fallen under Iranian influence, telling reporters in Geneva that Russia is responsible for most of the government’s gains. “I do not see Syria as a triumph for Iran. I see Iran as a hanger-on. Iran has not particularly been successful in liberating areas,” he said.

In all of their maneuvers, the militias are operating with the blessing of the sovereign governments, making it hard to discern where Iran’s agency begins and the governments’ ends.

The relationships are, however, part of a deliberate strategy by Iran to wield influence through local proxies that operate in cooperation with governments, said Mohammed Obeid, a Beirut-based political analyst who is close to Hezbollah. Much in the way that the Iranian-backed Hezbollah has woven itself into the fabric of the Lebanese state, Iran’s allies in Syria and Iraq are establishing themselves as vital but parallel components of the national security forces, he said.

“The Iranians were smart, and they still are smart. They wanted to export their revolution. But they found that they don’t need to overthrow the governments in the region,” Obeid said. “They can create political and military groups alongside these governments, and Hezbollah is the prime example. Hezbollah is now part of the government, part of parliament, and it is a strong military force on the ground. Which no other force in the world can destroy.

“They are succeeding in what they wanted to do, which was to spread their influence throughout the region.”