Iran is a force to be reckoned with. As the largest country in the Middle East, it has a young and well-educated population, as well as the capacity to pursue a serious international agenda.

With only a few days remaining to negotiate an agreement on Iran’s nuclear program, focus is shifting to the potential impact of the deal on regional security. A nuclear deal could open the doors to sustained, tactical cooperation between the West and Iran — a real necessity in an otherwise crumbling region.

So is Iran the West’s next partner in the region?

Doubtful. No one is ready to call Iran a friend. And despite Supreme Leader Ayatollah Ali Khamenei’s apparent change of tone, no hardliner in Iran is ready for a serious rapprochement with the Great Satan, either.

Nevertheless, a deal opens the door to a number of things. For better or worse, meaningful dialogue with Iran is predicated on resolving the nuclear issue. All other problems have taken a back seat over the past two decades. A deal makes sustained engagement of Iran a possibility. It presents an opportunity to moderate Iran’s three decades of hostility towards the West. And it makes it possible to draw Iran into an effort to stabilize the Middle East. In a region characterized by chaos, strong states that aren’t systematically opposed to Western policies are welcome.

What’s more, a deal will empower President Hassan Rouhani’s administration. Today, the foreign ministry makes few foreign policy decisions; the most important ones, including those about Syria and Iraq, are largely within the remit of Iran’s revolutionary guards. A nuclear agreement would give Rouhani and Foreign Minister Mohammad Javad Zarif the political capital to gradually takeover these files, and lend credence to the team that actively seek engagement with the rest of the region. After all, Foreign Minister Zarif continues his overtures to Saudi Arabia, despite domestic hardliner opposition.

There is no doubt that a strong, liberal and independent Iran will naturally pursue its own interests, and these may not always align with the West’s. But Tehran is more likely to be sympathetic to Western goals if it develops ties with the European Union and the United States. There is no shortage of common goals: From combating extremism to stopping the drug trade by ensuring a stable government in Afghanistan, Iran and the West have their work cut out for them.

At present, nothing is more pressing to both sides than defeating the Islamic State of Iraq and the Levant (ISIL). Iran is more committed to Iraq than any other regional player, and ISIL can’t be defeated with U.S.-led airstrikes alone. The coalition needs local and regional support, and with a deal, greater coordination between all sides becomes diplomatically acceptable.