Prime Minister Benjamin Netanyahu is an outspoken opponent of the Iran nuclear deal, but some in Israel's security establishment see it as a least-bad option that should be preserved.

President Donald Trump is set to announce Tuesday whether the U.S. will exit the 2015 agreement between Iran and world powers.

The agreement lifted painful economic sanctions against Iran in exchange for curbs on its nuclear program. Netanyahu has been a leading critic of the deal, saying it did not contain sufficient safeguards to prevent Iran from reaching nuclear-weapons capability or address Iran's other activities across the region or its long-range missile program.

Trump's disdain for the deal has been a welcome development for Netanyahu.

But while Netanyahu has been urging the deal be either "fixed or nixed," not all are clamoring to cancel the agreement.

"An American announcement that it's withdrawing from the agreement would let Iran drive a wedge between the world powers and gradually loosen international oversight over its nuclear program," Amos Gilad, a retired senior Israeli defense official, told the Haaretz newspaper for a story published this week.

"If the Americans abandon the agreement, they have to prepare for alternatives, and I don't see this being done," he said.

Gilad said Israel needs to prioritize the threats it faces.

"If Iran now continues to suspend its nuclear project for eight or 10 years, in accordance with the agreement, that will let us focus on more urgent threats relating to the Iranian army establishing a presence in Syria, and preparing the Israeli army for the possibility that, in the future, we'll have to deal with the nuclear (issue) if a confrontation erupts," he told Haaretz.

Israel considers Iran an existential threat because of its nuclear and missile programs, its support of violent anti-Israel groups in the region and frequent calls for destruction of the Jewish state.