The Middle East is at a crossroads. It’s crunch time for two of the region’s most difficult issues, the civil war in Syria and the Iranian nuclear program. In both cases, the predominant dynamic was long pointing toward war – in Syria’s case for two and a half years, in Iran’s case for a whole decade. This fall, for the first time, the dynamic on both issues may change direction and start leaning toward peace. Should this actually happen, broad-based international cooperation will be required to make the change sustainable.

These dynamics have changed in accordance with the interests of the principal players, the Obama administration in the United States on the one hand and the leadership groups in Damascus and Tehran on the other. President Obama is in the business of ending wars, not starting them. In that, he is true to his Nobel credentials, even though they were bestowed on him far ahead of any achievement. Most Americans support Obama’s policy of partial retrenchment in foreign affairs in order to focus on domestic issues.

In Syria, the regime of Bashar al-Assad has accepted chemical disarmament as the only means to avert U.S. military strikes. Damascus expects to be bargaining from a relatively strong position at the upcoming Geneva II conference. Iranian President Hassan Rouhani and the Supreme Leader Ayatollah Khamenei are likewise looking for a deal with the international community that would allow Iran both to have a nuclear program and to get trade and other restrictions lifted. Capitulation isn’t on the books for either country’s leadership.

All agreements are built on compromise and all negotiations demand concessions. It is perfectly natural that not everyone is happy about the sudden outbreak of peace in the Middle East. Israeli Prime Minister Benjamin Netanyahu’s goal remains the complete dismantlement of Iran's nuclear program. Saudi Arabia is working on building a Syrian rebel army to eventually defeat President Assad. A number of lawmakers in Washington support both causes in opposition to President Obama. In Iran, the Revolutionary Guards and other hard-liners who profit from the popular deprivation that has been the result of confrontation would much prefer the status quo.

So far, negotiations have been difficult. Agreement, if at all, will only come in installments. Anybody seeking a better deal or wanting to appear important can throw a wrench into the process. With Iran, something very close to what is on the table now was nearly agreed in 2003. Yet those talks failed, resulting in ten years of standoff enlivened by periodic war scares. With Syria, each month of fighting claims thousands of lives. While the beginning of a political settlement in Syria will certainly be facilitated by a nuclear deal with Iran, the reverse is also true: a failure to reach a deal on nuclear issues will make it much harder to stop the bloodshed next door. The Iran-Syria nexus works both ways.

It is encouraging that the international community has come together both on the Syrian and the Iranian issue. Damascus's chemical disarmament—which even last summer would have been thought impossible—is actually being implemented in the middle of a civil war. This has been made possible through close cooperation between the United States and Russia, even though both countries until recently seemed poised for confrontation. The fiery rhetoric between Moscow and Washington hasn’t really died down, but this does not stop them from cooperating on the base of shared interests.

Nor did the differences between Washington and its European allies, on the one hand, and Russia and China, on the other, make it impossible for world powers to arrive at a joint approach to the Iranian nuclear program. It may seem counterintuitive, but Moscow and Beijing have de facto been supportive of the budding rapprochement between Washington and Tehran. Neither Russia nor China looks forward to an Iran with nuclear weapons and missiles or, alternatively, a U.S.-Israeli attack on Iran with incalculable consequences. Again, national interests dominate.

What is emerging is a new pattern of cooperation between countries that are neither like-minded allies nor cold war antagonists. This new pattern is thoroughly pragmatic, informed by competing visions of the future world order, and squarely based on shared interests. Such cooperation is essentially nonhierarchical in nature and driven by a jointly developed agenda; it finds its limits where interests don’t overlap.

In the Middle East, we have seen a rare and happy coincidence in the national interests of major outside players. Their politicians' needs match as well, allowing them to take advantage of available opportunities. Once such a pattern is in place—as it has been in the case of Syria after the Kerry-Lavrov talks in Geneva last September, or in the case of Iran after this week's P+5 initial accord—it needs to be sustained by practical, result-oriented work. This is how the door to more regional and global stability can be opened.