JERUSALEM — He offended the last United States president by trying to sink the Iran nuclear deal in Congress, antagonized the countries that had negotiated it, and helped make support for Israel a partisan issue in American politics.

For Prime Minister Benjamin Netanyahu of Israel, President Trump’s decision on Tuesday to abandon the 2015 agreement was such a wholesale vindication that he abruptly cut short a trip to Cyprus to be in Israel when it was announced.

It would have been unseemly, after all, to gloat while on foreign soil.

“Israel fully supports President Trump’s bold decision today to reject the disastrous nuclear deal with the terrorist regime in Iran,” Mr. Netanyahu said moments after Mr. Trump’s remarks. “Israelis opposed the nuclear deal from the start because we said that, rather than blocking Iran’s path to the bomb, the deal actually paves Iran’s path to an entire arsenal of nuclear bombs, and this within a few years’ time.”

Even as Mr. Netanyahu spoke, Israel was bracing for the possibility that Mr. Trump’s move could free Iran of constraints that may have held it back from retaliating against recent Israeli airstrikes in Syria. Those attacks have come amid a shadow war in which Iran has used the cover of the Syrian conflict to build a military infrastructure there to confront Israel.