Hamas hailed the failure of a US-sponsored resolution condemning the Gaza-based terror group Thursday, calling it a “slap” against the Trump administration.

While the draft resolution received a comfortable majority of votes, it fell short of the two-thirds super-majority needed to pass, with a final tally of 87 in favor, 57 opposed and 33 abstentions.

Most of the “no” votes came from the Arab and Muslim world, while much of the West backed the resolution.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

“The American draft resolution’s failure in the United Nations is a slap to the American administration, an affirmation of the legitimacy of the resistance and major political support for the Palestinian people and issue,” Hamas official Sami Abu Zuhri wrote on Twitter, employing a phrase commonly used to refer to Palestinian terrorist groups.

The resolution, entitled “Activities of Hamas and Other Militant Groups in Gaza,” would have condemned Hamas “for repeatedly firing rockets into Israel and for inciting violence, thereby putting civilians at risk.”

It was the first time a UN resolution specifically targeted Hamas. While General Assembly resolutions are non-binding, they are seen as an important barometer of world opinion.

Despite the failure of the vote to pass, after a last-minute request by Kuwait to require a two-thirds majority, Israeli leaders still feted the wide show of support for their position against the terror group.

Prime Minister Benjamin Netanyahu called the tally “a very important achievement for the US and Israel.”

Israeli Ambassador Danny Danon to the UN lamented after the vote that a decision to condemn Hamas had been “hijacked” by procedural votes and hailed the “broad support from the world” for condemning Hamas.

Ahead of the vote, protests against the draft resolution took place in several parts of Gaza.

At one protest in Khan Younis, a town in southern half of the coastal enclave, hundreds of Palestinians marched through the streets, with many hoisting Palestinian flags.

In Rafah, protesters burned American, Israeli and UK flags in protest of the resolution.

Earlier this week, Hamas Politburo chief Ismail Haniyeh had appealed to Arab leaders and UN Secretary-General Antonio Gutteres in an effort to stymie the draft resolution.

In a statement early Friday, Hamas thanked the states that voted against the resolution and rebuked those who voted in favor.

“Hamas calls on all states that stood with the American administration and the Israeli occupation in the United Nations to review their positions and correct their historic and dangerous mistake,” the terror group said on its official website.

Palestinian Authority President Mahmoud Abbas’s office also praised the draft resolution’s failure, despite a bitter intra-Palestinian rivalry with Hamas over control of Gaza.

“The Palestinian presidency welcomes the United Nations General Assembly’s rejection of the American draft resolution condemning the Palestinian national struggle,” the official PA news site Wafa reported.

In the past week, a number of Ramallah-based Palestinian officials came out against the resolution.

Nabil Abu Rudeinah, Abbas’s spokesman, said in a statement that the vote against the resolution “is a message to the American administration and Israel that all the conspiracies against the Palestinian leadership will not come to pass.”

The Palestinians have long enjoyed broad support in the UN General Assembly.

In December 2017, the UN body voted in favor a resolution rejecting US President Donald Trump’s recognition of Jerusalem as Israel’s capital.

Fatah vice chairman Mahmoud al-Aloul called the resolution’s failure to pass “a major Palestinian victory,” in a comment posted on Fatah’s official Facebook page.

The Palestinians had initially sought to thwart the US move by presenting an amendment to the US text to include a reference to UN resolutions that condemn Israeli settlements, call for negotiations on East Jerusalem and pledge support for the two-state solution.

After talks with the Europeans late Wednesday, the Palestinians agreed to withdraw their amendment and instead bring up a separate resolution, diplomats said.

That draft resolution, proposed by Ireland, called “for the achievement, without delay, of a comprehensive, just and lasting peace in the Middle East” based on UN resolutions. It passed by a wide margin.

AFP contributed to this report.