Sami Abu Zuhri
Sami Abu ZuhriAbed Rahim Khatib/Flash 90

Hamas on Thursday welcomed the failure of the US-drafted resolution to condemn it at the United Nations General Assembly, labelling the result a "slap" to US President Donald Trump's administration.

"The failure of the American venture at the United Nations represents a slap to the US administration and confirmation of the legitimacy of the resistance," Hamas spokesman Sami Abu Zuhri wrote on Twitter, according to AFP.

While the US resolution achieved a majority of 87 countries that voted in favor, that majority was not a two-thirds majority and thus the resolution 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 Nikki Haley in the United Nations before she leaves office.

In recent days, 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".