Thursday night’s dramatic declaration of a framework nuclear agreement between Iran and the world powers surprised almost everyone outside of the locked negotiating rooms at the hotel in Lausanne, Switzerland, including the doubtful, cynical journalists waiting outside those rooms over the past eight days for the results. Also surprised, though they’ll never admit it, were many officials, including Israelis, who have vehemently attacked the emerging deal in recent months.

In contrast to the messages conveyed in Prime Minister Benjamin Netanyahu’s speech at Congress, the Israeli government’s public position over the last two years and the Pavlovian response that came out of Jerusalem on Thursday night, the framework agreement is not a bad deal at all. In-depth examination of the details shows that the deal includes many positive aspects that preserve Israeli security interests and answer some of Jerusalem’s concerns.

Iran perhaps scored some victories in terms of the narrative. Its rights, as it sees them, were respected by the world powers, and Iran can declare that its nuclear facilities won’t be closed, that uranium enrichment will continue, and that the humiliating sanctions will be lifted. But the world powers made significant achievements of their own on the real practical issues.

The framework agreement levels many restrictions on the Iranian nuclear program for generations to come. The Israeli government’s claims that in a decade, Iran’s nuclear program will be normalized in the eyes of the world, and that the Islamic Republic could then do as it wishes, have turned out to be baseless.

Correct, the limitations on the number of centrifuges Iran will be allowed to operate will expire in 10 years’ time. It would have been preferable if that timeframe was longer. However, over the next 15 years, Iran won’t be able to enrich uranium past 3.5 percent, and at that level, it cannot be used for nuclear weapons. The most the Iranians could do with such uranium would be to use it for peaceful purposes, or leave it in storage, collecting dust.

Also, the tight, invasive oversight of Iran’s nuclear program as defined by the framework, which will certainly be fleshed out in the final agreement, includes allowing UN inspectors into every Iranian nuclear facility, as well as uranium mines and storage facilities for a period of between 20 and 25 years.

One positive aspect of the agreement is that Iran agreed to sign and ratify the additional protocol of the Non-Proliferation Treaty, which allows the UN to conduct surprise inspections at any facility suspected of housing nuclear activity. The significance is that it will be very difficult for Iran to develop a nuclear program in secret, and if it tries to do so, it will likely be uncovered. Attempts to limit or obstruct inspectors would constitute a gross violation of the agreement, which could lead to reinstatement of the international sanctions.

The agreement includes stipulations that are less easy for Israel to swallow, like the permission to continue research and development of advanced centrifuges, or the removal of economic sanctions and the sanctions leveled by the UN Security Council. But those are not the most critical clauses of the agreement, and they are definitely not ones that cannot be mitigated in a discreet, intimate and non-confrontational dialogue with the Obama administration.

Israel will have a hard time fighting this agreement, or portraying it as bad. One of the reasons for this is that it’s clear to anyone that reads the agreement will understand that if Iran indeed upholds it, the threat of an Iranian nuclear weapon will be severely reduced over the next two decades, at least. Also, it is now clear that the military strike that Netanyahu was pushing for will not be able to achieve the same things as the agreement. It’s doubtful if Netanyahu, who tried to enlist Congress’ support against the agreement, will be able to find 13 Democratic senators who would vote against Obama.