The United States, Saudi Arabia and Israel were painting Iran as the primary source of instability in the region, a nation supporting terrorist groups in Yemen, Lebanon and Gaza and fighting on behalf of the government of President Bashar al-Assad in Syria. The road to ratcheting up the pressure on Iran — a sectarian rival hated by the Saudi kingdom for its version of political Islam — seemed open.

Then they started fighting among themselves.

A Qatari news report, subsequently dismissed by the Qatari government as fake, was said to have quoted the emir as saying he wanted to ease tensions with Iran. Saudi Arabia and the United Arab Emirates reacted furiously, starting a diplomatic and trade blockade against the gas-rich nation, handing over the list of 13 demands — “demand 13: agree to all our demands”— and even forbidding their citizens to wear Barcelona soccer jerseys because they bear the name of their sponsor, Qatar Airways.

One of those demands is that Qatar close a Turkish military base, which would alienate Turkey, a NATO member and an ally of Saudi Arabia in Syria. “Instead of making an Arab NATO, they are only making more enemies,” said Hamidreza Taraghi, a hard-line analyst in Iran. “In the end, only America is benefiting, selling all those weapons to those countries.”

But even there, the Persian Gulf confrontation is creating some nervous moments for the Pentagon, which is running the Syria air campaign out of a major base in Qatar.

It was a familiar turn of events for the clerics in Tehran, whose regional competition with Saudi Arabia and other Arab countries sometimes means just waiting for the Saudis to shoot themselves in the foot, analysts here say.

That strategy seems even more appropriate with the rise of Mohammed bin Salman, 31, the recently named Saudi crown prince, who is developing a reputation for impulsive foreign policy moves that do not work out as planned. He is the architect of the Saudi war in neighboring Yemen, which was supposed to be a blitzkrieg that would end in two days but is dragging into its third year and has caused a horrific humanitarian crisis.