CAIRO — Almost as soon as he had announced a nuclear deal with Iran, President Obama called King Salman of Saudi Arabia to reassure him of America’s “enduring friendship.”

Returning the courtesy, King Salman, who is Iran’s chief regional rival, responded that he hoped the deal would “reinforce the stability and security of the region and the world,” the Saudi Press Agency reported on Friday.

But the picture on the ground was not so harmonious.

As Tehran and its clients around the Arab world celebrated the accord as a triumph of Iranian resolve, Saudi Arabia and its allies declared that the agreement had only reinforced their determination to push back against Iranian influence, with or without Washington. On the front lines of battles with Iranian proxies in Syria and Lebanon, some cried betrayal.

“The Saudi king decided his country could no longer bear the provocative Iranian expansive policy in the Middle East, or the American silence over it,” wrote Jamal Khashoggi, a veteran Saudi journalist and former government adviser, in a commentary this week on what he called “the Salman doctrine.”