The United States stands to see impressive progress on a longstanding foreign-policy wish this month.

No, not curbing Iran’s nuclear program—though negotiations on a deal with Tehran remain on the front burner as a June 30 deadline approaches. But the American-helmed effort to reach a deal with Iran has so rattled the Middle East that it has had the effect of hastening rapprochement between Israel and Arab nations.

Israel and Saudi Arabia don’t have diplomatic relations and never have, but on Thursday, the two countries revealed at an event at the Council on Foreign Relations in Washington that they’ve been covertly conducting diplomacy to discuss Iran over a series of five meetings since 2014. The reveal came from Anwar Eshki, a former Saudi general and ambassador to the U.S., and Dore Gold, a former Israeli ambassador to the UN. While both of them are currently think-tankers, Gold is set to become director-general of Israel’s Ministry of Foreign Affairs this weekend, the top position below the foreign minister. Since Prime Minister Benjamin Netanyahu holds that portfolio, Gold will effectively be running the office.

Both countries have been rattled by worries that a deal negotiated by the U.S., Iran, and several other countries to curb Iran’s nuclear program could give Iran too much leeway and pave the way for it to get nuclear weapons. They’re also worried about Iran’s growing strength as a regional power. In addition to backing Hezbollah, a constant antagonist of Israel, for years, Tehran has become involved on Saudi Arabia’s southern border in Yemen in recent months with its backing of the Houthi rebels who ousted Yemen’s president in January. Given Saudi military action against the Houthis, Yemen’s civil war has elements of a proxy war between Saudi Arabia and Iran.

"Our standing today on this stage does not mean we have resolved all the differences that our countries have shared over the years," Dore said, according to Bloomberg View’s Eli Lake. "But our hope is we will be able to address them fully in the years ahead."

Eshki’s prepared remarks offered a potted history of the Middle East, laying out what he viewed as Iran’s imperial plan. And he offered a seven-point plan for peace in the region, kicking off with peace between Israel and Arab nations and, next, regime-change in Iran. (The plan also includes the creation of a new state of Greater Kurdistan including parts of Iran, Iraq, and Turkey.)

Eshki and Gold also shook hands on stage.

The CFR event isn’t the only sign of some friendliness between Israel and Saudi Arabia. There have been reports about secret collaboration for years, often denied by both governments. A 2009 report said that Saudi Arabia had offered to let Israel fly over Saudi territory to attack Iran, a report Israel knocked down. Another report claimed that Israel had offered its “Iron Dome” missile-defense technology to Saudi Arabia for use in Yemen in the proxy battle. A survey released Thursday found that Saudi citizens are far more concerned about Iran than the Zionist state. “The poll found that 53 percent of Saudis named Iran as their main adversary, while 22 percent said it is the Islamic State group and only 18 percent said Israel,” the AP noted.

None of this should be taken to understate the enduring enmity between Israel and Saudi Arabia—despite U.S. attempts over the years to bring about better relations between its two most important regional allies. Not only have the countries never had diplomatic relations, but there’s been enduring tension between them for decades. The Saudis and Egyptians long jostled for primacy in the Arab world, and Riyadh resoundingly rejected the Camp David Accords establishing peace and diplomatic relations between Israel and Egypt. Saudi Arabia remains party to an Arab League boycott of Israeli goods.

But Saudi Arabia is wary of Hamas, and it remained notably quiet during Israel’s bombing campaign against the Hamas-controlled Gaza Strip last year. The Saudis have tried to make their Arab Peace Initiative the centerpiece of regional deal, which Netanyahu has declined to do.

It’s a little ironic that Iranian progress toward a bomb has driven Saudi Arabia toward Israel. While Saudi Arabia does not have a nuclear-weapons program, it has flirted with the idea repeatedly over the years, citing Israel’s widely known but never publicly acknowledged nukes. In a recent interview with my colleague Jeffrey Goldberg, President Obama projected confidence that Saudi Arabia wouldn’t seek its own bomb. “They understand that ultimately their own security and defense is much better served by working with us,” he said.

But if this rapprochement is real—and Elliott Abrams, who chaired the CFR session, offers some reasons to be optimistic but tempered—it may be that the Saudis would rather cast their lot with Israel than with a U.S. government they think is giving too much away to Iran. And that points to the remaining barriers the U.S. has in selling the nuclear deal to its allies. Washington may finally be seeing an opening in Israeli-Saudi relations, but it just goes to show that you should be careful what you wish for—or at least be careful about how you get it.