Saudi Arabia will be a big part of the Obama administration's push for an international coalition to fight the Islamic State extremist group. Iran is already in that fight, backing a new government in Baghdad and helping arm the Kurds.
So how does Washington balance long-standing mistrust between Tehran and Riyadh with Iran's informal cooperation against the Islamic State?
In the fight against Islamic State militants in Iraq, it is U.S. airstrikes that are backing advances by Kurdish forces.
But the president of Iraq's Kurdistan region, Massoud Barzani, says it is Tehran that is helping Kurds on the ground.
"We asked our friends to arm our forces and send us weapons, and the Islamic Republic of Iran was the first country that provided us with the required weapons," he said.
Iranian Foreign Minister Javad Zarif says Tehran is open to working on a broader approach to confronting the Islamic State group.
"We are prepared to talk at the international level with other countries and with the international community as a whole with regard to what is needed to be done in Iraq and in Syria and in this region," Zarif said.
With U.S. Secretary of State John Kerry building an international coalition against the Islamic State, Iran's involvement in that fight, even outside a formal coalition, could be a problem for Washington, says former U.S. ambassador to Iraq Ryan Crocker.
"I think it could drive the Iraqi Sunnis completely the wrong way - I think it could create serious problems in our relations with Egypt, with Saudi Arabia, with other Gulf states at a time when we all need to coordinate much more closely again against a common threat," he said.
U.S. Institute of Peace analyst Steve Heydemann says it is the gravity of that threat that makes for unlikely alliances.
"Iran and Saudi Arabia are bitter adversaries around most issues and yet find themselves forced to consider the possibility of collaborating against an enemy that has expanded its territory of operation dramatically in the last two months," he said.
The advance raises prospects for such collaboration, says Georgetown University professor Nora Bensahel.
"We are probably unlikely to see the United State trumpeting cooperation with Iran, for example or the Saudis trumpeting cooperation with Iran. But it may lead to quieter, behind-the-scenes, increased intelligence-sharing, those types of things in order to address what is largely seen as a common threat despite other interests that may be very, very strongly opposed," said Bensahel.
Which is why Arab Gulf states may set aside their differences with Iran, says American University professor Akbar Ahmed.
"It makes sense. It's a very tribal configuration. This is how tribes and clans operate when they face a common threat," he said. "They unite for the time being, and perhaps they will continue their rivalry in other forms and at other times."
Ahmed says one of the clearest signs of a Saudi-Iranian detente is the enthusiasm with which Riyadh welcomed the new government in Baghdad - still led by Shi'ites backed by Iran but promising to be more inclusive of Iraqi Sunni and Kurds.