Israel would seem to be in a disastrous position, given the inevitable nuclear capabilities of Iran and the recent deterioration of its relationship with the United States, its former patron and continued financial benefactor.
Immediately upon entering office, President Obama hectored Israel on so-called settlements. Obama promised to put "daylight" between the U.S. and Israel -- and delivered on that promise.
Last week, the U.S. declined to veto, and therefore allowed to pass, a United Nations resolution that, among other things, isolates Israel internationally and condemns the construction of housing in East Jerusalem and the West Bank.
Obama has long been at odds with Israeli Prime Minister Benjamin Netanyahu. Over objections from the Obama administration, Netanyahu addressed a joint session of Congress last year about the existential dangers of the Obama-brokered Iran deal and the likelihood of a new Middle East nuclear proliferation race.
Obama then doubled down on his irritation with Netanyahu through petty slights, such as making him wait during White House visits. In 2014, an official in the Obama administration anonymously said Netanyahu, a combat veteran, was a "coward" on Iran.
At a G-20 summit in Cannes, France, in 2011, Obama, in a hot-mic slip, trashed Netanyahu. He whined to French President Nicolas Sarkozy: "You're tired of him? What about me? I have to deal with him every day."
In contrast, Obama bragged about his "special" relationship with autocratic Turkish President Recep Tayyip Erdogan. Never mind that Erdogan seems to want to reconstruct Turkey as a modern Islamist version of the Ottoman Empire, or that he is anti-democratic while Israel is a consensual society of laws.
The Middle East surrounding democratic Israel is a nightmare. Half a million have died amid the moonscape ruins of Syria. A once-stable Iraq was overrun by the Islamic State.
The Arab Spring, U.S. support for the Muslim Brotherhood in Egypt, the coup of General Abdel Fattah al-Sisi to regain control of Egypt, and the bombing of Libya all have left North Africa in turmoil.
Iran has been empowered by the U.S.-brokered deal and will still become nuclear.
Russian President Vladimir Putin's bombers blast civilians not far from Israel's borders.
Democrats are considering Rep. Keith Ellison as the next chairman of the Democratic National Committee despite his past ties to the Nation of Islam and his history of anti-Israel remarks.
Yet in all this mess, somehow Israel is in its best geostrategic position in decades. How?
The answer is a combination of unintended consequences, deft diplomacy, political upheavals in Europe and the United States, and Israel's own democratic traditions.
Huge natural gas and oil finds off Israel's Mediterranean coast and in the Golan Heights have radically changed Israel's energy and financial positions. Israel no longer needs to import costly fossil fuels and may soon be an exporter of gas and oil to needy customers in Europe and the Middle East. (America recently became the world's greatest producer of carbon energy and also no longer is dependent on Middle Eastern oil imports, resulting in less political influence by Arab nations.) Israel is creating its own version of Silicon Valley at Beersheba, which is now a global hub of cybersecurity research.
The Obama administration's estrangement from Israel has had the odd effect of empowering Israel.
Rich Persian Gulf states see Obama as hostile both to Israel and to themselves, while he appeases the common enemy of majority-Shiite Iran.
After a "leading from behind" U.S withdrawal from the Middle East, many Arab nations now see Israel more as a powerful ally against Iran than as an old existential enemy. They also see Israel as a country that has likewise been snubbed by America.
The idea of an Arab-Israeli understanding is surreal, but it is developing from shared fears of being targets of Iranian bombing and American indifference.
Many of Israel's neighbors are threatened by either ISIS or al-Qaida nihilists. Those deadly dangers remind the world that democratic, free-market Israel is the sole safe port amid a rising Middle East tsunami.
Changing Western politics are empowering Israel as well.
More than 2 million migrants -- for the most part, young males from the war-torn Middle East -- have terrified Europe, especially after a series of radical Islamic terrorist killings. Suddenly, Europe is far more worried about Israel's neighbors than about lecturing Israel itself.
Pushback against the Obama administration extends to its foreign policy. President-elect Donald Trump may be more pro-Israel than any recent U.S. president. And he may be the first U.S. leader to move the American embassy to Israel's capital in West Jerusalem.
For all the chaos and dangers abroad, the map of global energy, Western politics and Middle Eastern alliances has been radically redrawn.
At the center is a far stronger Israel that has more opportunities than at any other time in its history. It will have an even brighter future after Obama has left office.