The UN Security Council resolution that was to have passed Thursday would have isolated Israel, encouraged antisemitism, and emboldened Palestinian terrorists.

It also would have tied the hands of the next presidential administration, committing it to opposing Israeli territorial claims in the West Bank and Jerusalem. It might even have led to the prosecution of Israeli Prime Minister Benjamin Netanyahu at the International Criminal Court on trumped-up charges.

It was, in short, a disaster.

Breitbart Jerusalem’s Aaron Klein dissected everything wrong with the Palestinian-backed resolution declaring Israeli settlements illegal, which was to have been introduced by Egypt, which holds a temporary seat on the Security Council. Israeli settlements are not (generally) illegal, and they are not the main obstacle to peace. (If they were, Palestinians would not have turned the densely-populated Gaza Strip into a rocket launch pad and turned greenhouses into terror tunnels.)

Above all, what the resolution would have done is validate the boycott, divestment, and sanctions (BDS) movement — those campus radicals screaming “Allahu Akbar!” at Jewish students as they bully clueless undergraduates into hating the Middle East’s only real democracy.

That is the mob to which a young Barack Obama made his first political promises, pledging to be “more up front” about the Palestinian cause once he had political room. This was his last chance to make good on that vow.

The Obama administration had vetoed such resolutions in the past, but it was not certain to do so this time. Over the past few weeks, Obama sent signals that the U.S. would, in fact, abstain from a vote declaring Israeli settlements illegal.

Hence the proliferation of proposals — not only from Egypt, whose government has been friendlier to Israeli since the fall of the Muslim Brotherhood, but also from Sweden and New Zealand. They would not have taken the diplomatic risk without Obama’s nod.

Breitbart News sources indicate that Israeli diplomats were desperate, but unsure what to do. If Obama had decided to stab Israel in the back, and exact revenge from Netanyahu for opposing his Middle East agenda for eight years, there was almost no way Israel could respond. Worse, a UN Security Council resolution would have been irreversible, since several nations hostile to Israel — including, at times, Russia and China — hold vetoes of their own, and would have blocked a future repeal.

So President-elect did what he does: he Tweeted.

The resolution being considered at the United Nations Security Council regarding Israel should be vetoed….cont: https://t.co/s8rXKKZNF1 — Donald J. Trump (@realDonaldTrump) December 22, 2016

And his Tweet linked to a statement: “The resolution being considered at the United Nations Security Council regarding Israel should be vetoed,” Trump said.

He added: “As the United States has long maintained, peace between the Israelis and the Palestinians will only come through direct negotiations between the parties, and not through the imposition of terms by the United Nations.” Obama was on notice: he would be defying precedent.

Egypt understood the message, too. President Abdel Fattah el-Sisi did not want to squander an opportunity to show the Arab world he could stand up for the Palestinians, but on the other hand, he did not want to irritate the incoming U.S. president. So, as Reuters reported, he talked to Trump and agreed to shelve the Palestinian resolution for the moment.

That does not mean Israel is totally safe — Obama has four more weeks of mischief to make. But, for now, President-elect Trump saved Israel.

The general rule is that we have one president at a time. That was Obama’s excuse when he went golfing in Hawaii during the Gaza war of 2008-9. But when the lame-duck president is trying to change the rules of the game by permanently altering the international order, deference ought to go out the window.

Kushner and Bannon worked together all night Wednesday on the UN/Israel issue, per several people familiar with the discussions — Robert Costa (@costareports) December 23, 2016

For weeks, we’ve heard nothing but fear-mongering from groups like the Anti-Defamation League about antisemitism in the Trump administration.

Perhaps a “thank you” might be in order?

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He was named one of the “most influential” people in news media in 2016. His new book, See No Evil: 19 Hard Truths the Left Can’t Handle, is available from Regnery through Amazon. Follow him on Twitter at @joelpollak.