TOPSHOTS Yemeni tribal gunmen of the Popular Resistance Committees loyal to fugitive President Abedrabbo Mansour Hadi raise their weapons April 29, 2015. (Taha Saleh/AFP/Getty Images)

U.S. and Iranian officials have been insisting for years that they want to resolve the nuclear issue before discussing the sectarian wars raging across the Middle East. Not anymore. As the battles have escalated in recent months, so has talk about regional diplomacy.

The interest in peace talks was voiced by Iranian Foreign Minister Mohammad Javad Zarif, whom I interviewed here Wednesday in a 90-minute public forum organized by the New America Foundation. His message, repeated several times, was that Iran wants dialogue with Saudi Arabia and other Arab powers to end the wars ravaging Yemen and Syria.

U.S. officials share Zarif’s desire for negotiations, which he first floated in a New York Times op-ed piece last week. But they want to see evidence that Iran is actually ready to curtail its support for Hezbollah in Lebanon, President Bashar al-Assad in Syria, Shiite militias in Iraq and Houthi rebels in Yemen.

“We are interested,” a senior Obama administration official said Thursday. “We’ve spoken to Zarif about how ultimately [the Iranians will] have to be part of a regional solution. But Iran’s behavior has not been such as to inspire confidence that diplomatic discussions would work.” This official said that it would be hard for the administration to persuade Saudi Arabia, the United Arab Emirates and other Arab nations to join Iran in a diplomatic process without evidence that Zarif is offering “anything but rhetoric.”

On the nuclear issue, Zarif was optimistic in the conversation that a final deal could be reached by the June 30 deadline. On details of the agreement, such as sanctions relief and inspection procedures, there seemed to be less difference between Iranian and U.S. positions than had appeared to be the case a month ago. “It’s not a perfect agreement . . . but it’s the best we can get,” he said, echoing a line President Obama has used.

It’s probably no coincidence that Iran’s new interest in regional diplomacy comes as its proxies have faced tougher opposition on the battlefields in Yemen and Syria. In effect, Iran’s Sunni adversaries, led by the Saudis and Emiratis, have decided to push back hard against Iranian-supported forces, by intervening militarily in Yemen and working with Turkey and Jordan to mobilize rebels in Syria. For the first time in many years, Iran seems to be on the back foot in the regional proxy wars.

Rebel gains in northern Syria appear to reflect, in part, a Saudi-Turkish rapprochement that has pumped arms to Islamic fighters in a coalition known as the Army of Conquest. Saudi Arabia has supplied some factions with U.S antitank missiles, even though they fight alongside Jabhat al-Nusra, an al-Qaeda affiliate. Rebel groups in southern Syria are also making gains, and a Syrian opposition spokesman boasted Thursday of a coming “multilayered collapse of regime front lines.”

The United States has been pursuing a two-handed strategy, engaging Iran diplomatically on the nuclear issue while quietly supporting Saudi, Emirati, Jordanian and Turkish military moves.

The American hope is that military pressure in Syria and Yemen will drive adversaries toward an eventual diplomatic process similar to what Zarif describes — but with U.S. allies holding a stronger position on the battlefield. The United States sees the next step as a renewed joint effort by Washington and Moscow to broker a Syrian peace dialogue, which would later include Iran.

On Wednesday, Zarif outlined an Iranian four-point peace plan for Yemen that calls for a cease-fire, humanitarian aid, dialogue among Yemeni factions and a new coalition government. On Syria, he urged “national recognition” and a “national unity government,” though he repeated past Iranian arguments that Assad’s departure couldn’t be a precondition for such a transition.

“We require serious partners in Saudi Arabia to engage in serious discussion,” Zarif said, noting this week’s elevation of younger Saudi officials to key leadership positions. He said that his model for future regional security would be the multilateral process that helped stabilize Eastern Europe after the Cold War.

Zarif’s diplomatic outreach contrasts sharply with the continuing bombast from Iranian military leaders, such as Gen. Mohammad Ali Jafari, the head of the Iranian Revolutionary Guard Corps, who said Monday that the House of Saud is “teetering on the edge of collapse.”

When pressed whether Iran would halt its support for proxy groups that destabilize the region, Zarif offered only a general statement that “the regional security mechanism should be based on . . . noninterference in the internal affairs of other states.” To which Sunni powers such as Saudi Arabia might answer: Show me.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.