The moment of truth is coming. All the optics from Tehran -- even from Supreme Leader Ali Khamenei -- indicate that Iran is gearing up for a new attempt at a nuclear deal. If a deal can't be made in the next few months, it's hard to see another opportunity when the chances would ever be this good again. And yet skepticism about the ability of Iran's new president, Hasan Rouhani, to cut a deal is certainly warranted. Iranian presidents have much less power -- especially on foreign and security affairs -- than the supreme leader. And yes, Khamenei's recent public statements remain full of suspicion and enmity toward the West. But even Khamenei seems to be signaling his desire to find an end to the nuclear stalemate. 17, in a meeting with senior Revolutionary Guard commanders, he addressed them on the question of "flexibility": "A wrestler can even show flexibility sometimes, but he does not forget who his rival is and what his main goal is." Indeed, the supreme leader has been less than his usual vitriolic self when it comes to U.S. policy toward Syria. 11 speech, he was downright complimentary: "If [U.S. leaders] are serious about their recent outlook, this means that they have turned back from the wrong path which they have been taking during the last few weeks." Meanwhile, ever since he took office, Rouhani has been on a public relations offensive aimed at the West and reformists within his country. His most recent salvo was an interview with NBC News in which he said he had full authority to conclude a nuclear deal with the West. He has also recently exchanged letters with President Barack Obama, overseen the release of 11 political prisoners, and cautiously warned the Islamic Revolutionary Guard Corps about getting involved in the political arena. When he travels to New York City next week to attend the opening of the U.N. General Assembly, Rouhani will have a chance to transform this thaw in relations into a real diplomatic opportunity. If Iran's recent political history holds true, Rouhani has a unique window of opportunity to win sanctions relief. The last three Iranian presidents before him were able to influence policy in their first year before their powers faded. Each came into office with a strong agenda: Ali Akbar Hashemi Rafsanjani's goal was economic liberalization; Mohammad Khatami aimed for a cultural opening, and Mahmoud Ahmadinejad peddled a populist message. And all three were successful in making progress at the start of their terms -- though they all ran into strong resistance from the supreme leader as their tenure dragged on, which reversed their policies. Rouhani is even better placed than his predecessors to have real influence. He enjoys support from a broad swath of the Iranian political spectrum -- from hard-liners to reformists -- in no small part because of the lessons each camp is drawing from developments across the region. Hard-liners realize that the "resistance policy" advocated by the previous team has not worked well. Resistance has brought Iran only more sanctions, led Syrian President Bashar al-Assad to the brink of disaster, and lost Hezbollah the broad public support it once commanded across the region. They see Rouhani's strategy as a new approach toward the same goals, and they are willing to give it a try. As for Iran's reformers, they look to Cairo and see what happened to deposed Egyptian President Mohamed Morsy as a sobering lesson for what could have happened in Iran had they prevailed in 2009. A sharp confrontation with the old system and the security forces it controls, in other words, could have quickly brought about a de facto coup. Rouhani has also made good use of the support he commands. Though his election was as much a surprise as that of his two immediate predecessors, he has quickly assembled an impressive team of like-minded, effective technocrats -- most of whom are acceptable to the hard-liners. His style is the smile, not the snarl, which disarms critics used to the previous crowd's exaggerated rhetoric. Iran's new president does not needlessly pick fights like Ahmadinejad did, whether with foreigners over the Holocaust or young Iranians over Twitter. Rouhani's Rosh Hashanah greeting from a semiofficial Twitter account was just his style -- crafted to impress foreigners, but also framed in religious terms that gave hard-liners eager to criticize little to grab on to. Rouhani's book, National Security and Nuclear Diplomacy -- which made the case that the deals negotiated with European powers in 2003 and 2004 preserved Iran's options while forestalling international pressure -- may serve as a blueprint for his current strategy. It would be a smart move by Khamenei -- indeed, smarter than his usual practice -- to send Rouhani out to see what kind of a nuclear deal he can get from the United States. From Khamenei's perspective, it's a win-win scenario: If his president can get a good deal which preserves Iran's nuclear options, fine. If no deal is reached, Iran will still have gained many months in which its nuclear program can progress. It is hard to know how the recent developments about Syria have influenced Khamenei's thinking. It is possible he had already discounted the possibility of a U.S. strike on Iran, in which case the obvious U.S. reluctance to use force against Syria may come as no surprise to him. On the other hand, he has long insisted that the nuclear issue is only an excuse used by the United States to pursue its real objective of regime change in Iran, and he has similarly argued that the West's professed humanitarian concerns about Syria are a cover for its true objective of displacing Assad. Perhaps Khamenei will recalculate in the face of the evident willingness of President Barack Obama's administration to concentrate so exclusively on controlling weapons of mass destruction that it was prepared to sacrifice the Syrian opposition, and to largely ignore human rights concerns. In his Sept. 17 speech, Khamenei referred to a passage in a book he translated 40 years ago on the revered second Shiite Imam Hassan's peace treaty with Muawiyah, the founder of the Umayyad dynasty -- a treaty the likes of which Khamenei had once vowed Iran could never be pressured into again. The treaty was entered into under great duress: Hassan agreed to it when faced with superior forces on the field of battle. Its outcome was at best mixed: The line of descent was preserved (Hassan was the grandson of the Prophet Mohammed), but Hassan gave up rule over the Muslim community to Muawiyah and was years later almost certainly poisoned on Muawiyah's orders. But speaking on Sept. 17, Khamenei took a rosier view of the seventh-century peace deal: "I agree with what I called 'heroic flexibility' years ago, because such an approach is very good and necessary in certain situations, as long as we stick to our main principles." Perhaps in this newfound respect for Hassan's treaty, Khamenei was signaling that another Hassan -- Hasan Rouhani -- may need to be equally supple in the face of superior forces, even if the results are mixed.