President Donald Trump speaks frequently about bringing U.S. troops home and avoiding costly wars in the Middle East. But last month, the administration changed its position in one key area: the Syrian civil war. America will remain in Syria, National-Security Adviser John Bolton said, “as long as Iranian troops are outside Iranian borders.” He described the new policy as a strategic shift from countering ISIS to containing Iran.

Today, NBC News reported that the new strategy will include ramped up diplomatic and political efforts, but stay within the limits imposed by the current congressional authorization for the use of force in Syria. Part of the Trump administration’s strategy will be to withhold reconstruction aid from areas where Iranian and Russian forces are operating, in an attempt to further choke off funds to Tehran. While the strategy appears to seek to avoid direct confrontation between U.S. and Iranian forces, Washington has made it clear that American forces will defend themselves as necessary.

But while the contours of the containment strategy are emerging, many of the new policy’s components remain poorly defined. And history tells us that it will be harder to implement than many in the United States may expect.

After all, a reluctant America—whose leaders have struggled to bring the wars in Afghanistan and Iraq to an end—faces a determined adversary in Iran, a country whose leaders have committed their own blood, treasure, and thousands of fighters from across the region to Syria. Now that they’re beginning to see an end in sight, they aren’t leaving. In crafting its new containment strategy, the United States must reckon with Tehran’s investment in Syria.

Iran entered the Syrian conflict during its early days in 2011, maintaining a shadowy presence at the outset. Soon enough, hundreds of coffins were returning to Iran from the battlefields in Syria, forcing the regime to spend significant resources to bolster a dictator who used chemical weapons on his own people. But the rise of ISIS in 2014 provided justification for Tehran’s continued involvement in Syria. Today, as the Syrian civil war drags on, Iran appears poised to turn what’s long been a costly intervention into an opportunity to project power beyond its borders and deter its chief adversaries. In bolstering the Syrian leader, Bashar al-Assad, the Islamic Republic has secured the future of one of its primary client states and afforded it an opening to shape Syria’s reconstruction. For Iran, a country whose ongoing economic struggles are likely to worsen under renewed sanctions, this is a much-needed opportunity. And for the Trump administration—eager to increase pressure on and isolate Iran—this is one specific area where the United States will push back.

Now that the Trump administration is determined to push a state out of Syria—one reluctant to withdraw its forces without a fight—it’ll need a new way forward. To date, U.S. policy in Syria has been tailored to combatting an insurgency. More than 100 U.S. Marines recently participated in training exercises near al-Tanf in southern Syria, and approximately 2,000 American troops are stationed in Syria. Containment, however, could require even more troops and infrastructure, including the establishment of strategically situated outposts.

But the United States needs to be careful not to commit its ground troops to Syria indefinitely. Israel’s 18-year occupation of Lebanon from 1982 to 2000 was a textbook case of mission creep—reason enough for the United States to avoid similar mistakes and to strongly reconsider a long-term presence in the Levant. If President Trump is truly intent on waiting out the Iranians, an unending timetable for the withdrawal of troops is far more problematic for Washington than it is for Tehran. Iran is a regional power, not some intruder marching into someone else’s neighborhood. Its troops—Iranian military, the Revolutionary Guards, and Shia militias deployed by Tehran—are actually welcomed by Assad.

Indeed, one of the biggest challenges stemming from Iran’s involvement in Syria is that it has deployed thousands of Shia militants throughout the country. These forces are composed of foreign nationals trained and equipped by Tehran to maximize the regime’s battlefield effectiveness while minimizing costs for Iranian troops. Many of these militias are now beginning to leave the Syrian theater. Iran reportedly promised many benefits to these men upon their return from the conflict. But with its own economic woes and growing discontent within its populace, the Iranian regime isn’t in a position to support thousands of these fighters, many of whom come from Afghanistan, along with their families.

Instead, the mullahs could be looking to redirect these well-trained, battle-hardened forces to other conflicts where it’s currently involved, like the wars in Afghanistan and Yemen. Reportedly, they have already begun deploying some of them to these other theaters. As a result, these troops aren’t just a threat to Syria, but to other combustible places in the region. The United States will likely need to determine how to discourage Iran from redirecting them. Yet with the U.S. withdrawal from the Iran nuclear deal, diplomatic relations have reached a nadir.

In crafting its containment strategy, one key factor for the United States is the role of Russia. The administration is rightly looking to leverage President Trump’s rapport with Russian President Vladimir Putin to influence Iran’s moves in Syria. But Russia’s ability to shape Tehran’s behavior is limited. The mullahs have refused to defer to Russia, their partner in the conflict, even when it has offered strategic guidance. From their perspective, they’ve earned their position there, and the right to operate with autonomy. The United States could, however, help enlist Russia to de-escalate tensions between key players in Syria, while taking care not to further empower Moscow in the process.

Perhaps the most worrisome source of tension is the brewing conflict between Iran and Israel. In recent months, the two enemies have been facing off in Syria, with Jerusalem striking Iranian positions in theater and Tehran and its proxies firing rockets and flying drones close to Israel’s border, perhaps to provoke an overreaction. Preventing a broader conflagration between them in Syria will be an essential part of the new Iran containment strategy. As such, it may be the only way to force Iran to commit to downsizing its military footprint in Syria in any meaningful way, making diplomacy a critical tool in the pursuit of this new policy. Keeping U.S. troops in Syria may be necessary to securing leverage in any future political settlement.

The outcome of this policy pivot will have major implications for the region. If containment fails, Iran will have a clear path to extending its influence throughout the Middle East, while the United States could become further stuck in the morass of Syrian civil war with few tangible gains to show for its revamped approach.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.

Colin P. Clarke is an adjunct senior political scientist at the RAND Corporation and a senior research fellow at the Soufan Center.