Less than three weeks ahead of elections, Former Shin Bet chief Yuval Diskin unleashed a bitter critique of Prime Minister Benjamin Netanyahu, accusing him in an interview of putting his own interests ahead of the state’s, and of playing fast and loose with the country’s security.

In excerpts of the interview published on Ynet, Diskin, a 38-year veteran of Israel’s defense establishment, took Netanyahu to task for his handling of the Iran situation and the Israeli-Palestinian conflict.

“My colleagues and I felt unsure of Netanyahu’s and [Defense Minister Ehud] Barak’s ability to lead an effort on Iran. We didn’t trust these men’s motives. We feared that they would engage in stunts that could ensnare us as a country, for extraneousends and using non-kosher means,” said Diskin.

Netanyahu tried to convince him and his colleagues to approve what he called an “illegal” decision to attack Iran, Diskin said.

Recalling a particular closed forum meeting, Diskin said he had a feeling that “they were trying to steal something under the radar.”

Diskin spoke of a separate discussion on Iran, during which Netanyahu, Barak, and then foreign minister Avigdor Liberman smoked cigars, while outside the room chefs in white hats prepared a lavish lunch. “I don’t know if I’m successfully relaying how bizarre this whole story is,” said Diskin.

Diskin, who stressed that he himself is a political hawk and is not motivated by political considerations, also slammed Netanyahu for his handling of the Palestinian situation.

“Israel strengthened Hamas and humiliated [Palestinian Authority President Mahmoud] Abbas. We could have taken military steps to change things, but Bibi and Barak are too weak,” charged Diskin.

The full interview was published in Yedioth Ahronoth on Friday. Diskin was one of six former spymasters interviewed by documentary filmmaker Dror Moreh, whose film “The Gatekeepers” was recently shortlisted for possible nomination in this year’s Academy Awards.

Netanyahu and Barak dismissed Diskin’s statements, telling Yedioth Ahronoth that his words were falsehoods motivated by personal frustrations. In the past, sources close to the prime minister said that Diskin held a grudge against Netanyahu for passing him up for an appointment as Mossad chief.

Moshe Ya’alon, a former IDF chief who is now a Likud deputy prime minister, said debates over the key challenges facing Israel were conducted “seriously and in depth” under Netanyahu’s leadership. He said security chiefs like Diskin were “not always aware” of all the considerations affecting key decisions.

Another ex-general Amram Mitzna, now competing on Tzipi Livni’s Hatnua list, said Diskin’s comments were “chilling,” and that it was profoundly worrying that someone who had worked so closely with Netanyahu concluded that the prime minister was driven by narrow political considerations at the most vital moments.

Diskin let loose a similar tirade back in April, when the Iranian threat was making headlines on a daily basis, stating that the duo of Netanyahu and Barak were acting out of “messianistic” impulses, were misleading the public over the Iranian challenge, and that he had no faith in their capacity to launch a war on Iran or extricate Israel from one.

Speaking at a public event, Diskin said there might be “a measure of truth” in the first component of the Netanyahu-Barak assertions — that “if Israel doesn’t act, the Iranians will get the bomb.” But there was no truth in the second component they were peddling — that “if Israel does act, the Iranians won’t get the bomb.” He said the two politicians were appealing to “the idiots within the Israeli public” in making that claim.

He cited experts who had long argued, credibly he said, that an Israeli attack on Iran would simply enable the regime there to speed to the bomb openly, with a perceived increased sense of legitimacy.