The United Nations General Assembly voted on Thursday against a resolution to condemn the Hamas terrorist organization over its rocket attacks on Israel, its digging of terror tunnels, and launching of incendiary balloons at Israeli communities in the Gaza envelope.

Before the vote, the UN voted by a majority of 75 to 72, with 24 abstentions, for a two-thirds majority for the adoption of the US resolution condemning Hamas.

As such, even though the resolution received a majority of 87 votes in favor, it was not approved.

57 countries voted against the resolution, and 33 countries abstained.

The resolution was one of the final moves being promoted by US Ambassador to the UN Nikki Haley in the United Nations before she leaves office.

Speaking before the vote, Haley said that “the question before us now is whether the UN considers terrorism is acceptable if it’s directed at Israel.”

“Is the hatred of Israel so strong that you will defend a terrorist organization, one that is harming the Palestinian people? Isn't it time to let that go? For the sake of peace and the sake of this institution I respectfully urge my colleagues to this resolution,” she added.

Before the vote, Saudi Arabia said it planned to vote against the resolution condemning Hamas, explaining that issue is the “Israeli occupation”. Iran’s envoy also spoke before the vote, claiming Iran would vote against the resolution because “Hamas is a legitimate resistance movement of the Palestinian people”.

Hamas had been trying to convince the UN to vote down the measure. Last week, Hamas leader Ismail Haniyeh wrote directly to UN General Assembly president Maria Fernanda Spinosa, in response to the US and Israel's efforts against Hamas in the UN.

This week, Hamas received surprising support from its longtime rival Fatah, which is headed by Palestinian Authority chairman Mahmoud Abbas.

Abbas Zaki, a member of the Fatah Central Committee, condemned the American resolution and described it as a "clear racist decision".

On Monday, US special envoy Jason Greenblatt slammed the PA for defending Hamas, calling its actions “beyond absurd”.