There is one main reason why Iran is making conciliatory noises about its relationship with the United States and the future of its nuclear program. And there is one main reason why Bashar Assad, the Syrian dictator, is signaling his intention to give up his chemical weapons.

The reason: President Obama's toughness.

Yes, I know. But hear me out.

Obama has crippled the Iranian economy by organizing some of the harshest sanctions imaginable, and he has stated repeatedly that he won't allow Iran to acquire a nuclear weapon. The constant displays of American military might in the waters off Iran these past four years, coupled with clear statements that the United States would use force to thwart the regime's plans, have also impressed Iranian leaders.

Many Americans doubt Obama's willingness to use force against Iran, and many of Iran's Middle Eastern foes do, too. But the Iranian leadership is beginning to understand the price it is paying for its atomic desires.

On Syria, Obama's record is disturbing in many ways. He indicated that he would attack the regime as punishment for crossing the "red line" he drew on the use of chemical weapons, but he flinched when the moment came to launch a strike. His critics — including me — saw him as vacillating.

Yet Assad and his Russian sponsor, Vladimir Putin, both weighed the situation and came to the conclusion that the U.S. meant what it said. It is for this reason — and this reason alone — that Putin and Assad have agreed in principle to arrange for the removal of chemical weapons.

I don't like the administration's Syria policy — I wish it would work harder to remove the men who use chemical weapons, not just the weapons themselves, and I have almost no hope that the Putin-led plan will work. But Obama has managed, by threatening force, to buttress the international taboo on the use of poison gas. Again, this is a provisional and morally ambiguous victory, and it could easily come undone. But it was only Obama who forced what looks like modest progress on one core issue.

On Iran, all the usual caveats apply. The charm offensive recently undertaken by President Hassan Rowhani is nothing more than public relations until proven otherwise. It's pleasant to have an Iranian president who doesn't appear to be a lunatic, but there is also reason to fear Rowhani: He's a skilled negotiator who understands the utility of conciliatory words and an amenable demeanor.

The Israeli prime minister, Benjamin Netanyahu, who has been Obama's indispensable partner (not that either man would necessarily frame their relationship this way) in making Iran understand the price it would pay for pursuing nuclear weapons, is even more wary about Rowhani's public-relations campaign. His office said in a statement this week, "One must not be fooled by … fraudulent words. The Iranians are spinning in the media so that the centrifuges can keep on spinning."

Netanyahu's role is to play bad cop to what I hope will be Obama's ambivalent cop. One of the dangers of the coming weeks is that the White House will become so excited by the prospect of a resolution to the nuclear issue that it ends up making a bad deal that allows Iran to retain at least some capability to manufacture nuclear weapons. Or Iran's negotiators might find themselves unpleasantly surprised by the extent of the Obama administration's demands and ultimately balk.

Rowhani's mandate is to get the sanctions lifted. Sanctions are affecting average Iranians in ways the regime didn't fully expect. It is in the interest even of Iran's supreme leader, Ayatollah Ali Khamenei, to make these sanctions go away.

Rowhani doesn't have much time. The hard-liners in the Revolutionary Guard Corps are lying in wait. It would be premature for the United States to lift sanctions now, before anything substantive has happened. But it would also be a mistake to be too rigid.

"The objective of sanctions has been to subject Iran to enough pressure to compel them to make meaningful nuclear compromises," Karim Sadjadpour, of the Carnegie Endowment for International Peace, told me. "If they're prepared to do that, the U.S. has to be prepared to ease sanctions."

On Syria, no flexibility is required: Assad has made a promise and should be held to that promise.

The only constant in the Middle East is sudden change. Last week, Obama looked as if he had lost the plot. This week, he has created for himself a potentially historic opening. When he visits the United Nations next week, he might very well find himself shaking hands with the president of Iran.

It is no small thing for an Iranian president to shake hands with the leader of the Great Satan. But Obama, by placing unbearable pressure on Iran, may have given Rowhani no choice.