One of the most intriguing news stories out of Jerusalem currently involves the new director-general of Israel’s Foreign Ministry, longtime Netanyahu adviser Dore Gold. Addressing a June 1 media briefing at the think-tank he heads, the Jerusalem Center for Public Affairs, Gold let on that Hamas is “not a candidate to become a political partner.”

Quite the opposite, Gold toldreporters: “Hamas has been rigidly ideological and refuses to jettison the Hamas charter,” which calls for Israel’s destruction. Besides, Hamas is, like ISIS and Al Qaeda, “part of the jihadi universe.”

Normally such talk wouldn’t be a big deal. Prime Minister Netanyahu himself told the United Nations last fall that Hamas and ISIS are “branches of the same poisonous tree,” both bent on Nazi-style world domination.

But Gold’s statement came barely a week after negotiations with Hamas were publicly endorsed by none other than the president of Israel, Reuven Rivlin. Responding to a question about Hamas while visiting Israel’s north on May 28, the veteran Likud leader said he was “not opposed to talking with anyone who is willing to talk.” That put the president directly at odds with the prime minister.

A handful of senior Israeli figures have endorsed talks with Hamas before, including ex-Mossad director Efraim Halevy and ex-military intelligence chief Shlomo Gazit. But Rivlin is the first ranking official to support talks while in office.

True, Rivlin’s views carry no formal weight. Israel’s president, like England’s queen, has no policy role. But like the queen, the president isn’t an easy target for political attacks. Besides, Rivlin isn’t just president. He’s also Israel’s most popular public official, according to repeatedpolls. This puts Netanyahu in a ticklish position.

It’s even more complicated. The Rivlin-Gold exchange, if that’s what it was, comes amid a flurry of recent reports that the Israeli military has actually been negotiating with Hamas for months via Qatari and European intermediaries. The Israeli side aims to clarify terms for reconstruction in Gaza following last summer’s war. Hamas, reports say, wants to discuss a 5-10 year truce.

The Israeli in charge of contacts with Hamas, Major General Yoav “Paulie” Mordechai, coordinator of government activities in the territories, hasn’t hidden the fact that he’s open to a truce. Neither has the chief of staff of the Israel Defense Forces, Lieutenant General Gadi Eizenkot, whose views reflect the consensus of Israel’s military and intelligence community. Israel’s political leadership rejects the idea of a long-term accord with Hamas, but apparently has turned a blind eye to the talks as long as they’re arm’s-length and focused on practical issues. Things, however, are changing.

The talks apparently gained momentum after a Grad missile was fired into Israel May 26 from northern Gaza, the first such attack since last summer’s war. It landed in an open area and caused no damage, though one teen was treated for shock. The Grad was fired by a disgruntled cell of Islamic Jihad, Hamas’s junior ally and radical rival, but Israeli Defense Minister Moshe Yaalon said Israel held Hamas responsible.

Israel replied with aerial attacks on four unmanned Gaza targets, including two belonging to Hamas and one each belonging to Islamic Jihad and the Popular Resistance Committees. Hamas, uncharacteristically, didn’t counterattack. Instead it arrested four Islamic Jihad members the following day.

Since then the IDF and Hamas have eliminated the foreign middlemen and begun exchanging messages through a Palestinian figure, according to Yediot Ahronot’s authoritative military commentator Alex Fishman. The negotiations, in effect, have become direct.

The army and Hamas have talked directly in the past about “tactical incidents” along the border fence, Fishman writes, but “this time it’s fundamentally different.” This time they’re discussing Israel-Hamas relations.

That’s why Rivlin’s seemingly off-handed comment about negotiations with Hamas can be seen as a bombshell. Just hours before, Hamas had informed the IDF that it arrested the Islamic Jihad rocket crew. Rivlin said Hamas was “very concerned” about the rocket fire, “which was carried out by an organization that is challenging it.”

Israel’s military has been waging a sub-rosa tug-of-war with the prime minister for years over strategic direction on several fronts, including relations with the Palestinians.

The military believes negotiations can yield arrangements that deter enemy attacks and protect Israelis, which is supposedly the army’s job. Netanyahu doesn’t agree. He’s the boss, of course. But Rivlin has given the military’s argument a bit of political cover.

Here’s where Dore Gold comes in. As Netanyahu’s longtime alter ego, he can say things about the president that the prime minister can’t. By saying them off campus, in his capacity as his think-tank’s president-on-leave, he doesn’t implicate the government.

It’s unclear who’ll win this round. If Gold had simply declared Hamas off-limits for advocating Israel’s destruction, he could have chalked up a point and gone home. But he went another step and repeated the charge that Hamas is ISIS and Al Qaeda. “Some people try to portray the Al Qaeda affiliates that operate in Gaza as opposition to Hamas,” he said. “I believe that Hamas fully acquiesces to their presence in the territory.”

Indeed, “the very fact that Hamas is in partnership with Ansar Bayt al-Maqdis, the Sinai jihadi organization that just joined ISIS, is one very strong indication showing who are Hamas’s friends.”

Awkwardly, Gold spoke just as a month-long shooting war between Hamas and Ansar was turning deadly.

It started May 8, when Ansar Bayt al-Maqdis shelled a Hamas base in Khan Younis, bordering Sinai. In the weeks since, the Gaza affiliate, Ansar a-Dawlat al-Islamiya, Supporters of the Islamic State in Jerusalem, has claimed credit for a wave of bombings. Hamas has arrested and allegedly tortured dozens of Ansar members.

On May 30, two days before Gold’s June 1 talk, five gunmen with ISIS insignia assassinated a Hamas officer, Sabah Siam, in downtown Gaza City. Over the next four days the group repeatedly called via social media for Hamas “heretics” to cease their “war against religion.” On June 2 it issued a 48-hour ultimatum for Hamas to repent its sins and resume shelling Israel. Hours later, Hamas troops killed a known Ansar supporter, Honnor al-Younis, in a shootout at his heavily armed Gaza City home. Not much of a “partnership.”

Gold’s blunder, though embarrassing, is instructive. His Jerusalem think-tank has for years been a prolific source of highly alarmist commentary on Israeli security. It’s widely seen as authoritative, given his closeness to government leaders. Not always obvious is how sharply it diverges from actual Israeli intelligence. This gives us a peek behind the curtain.

Beyond that, many readers — including some Israeli security officials — have wondered where Netanyahu gets his information, since he obviously doesn’t listen to Israeli intelligence. Maybe now we know.

Contact J.J. Goldberg at goldberg@forward.com or on Twitter @jj_goldberg