The U.S. sought support for a UN General Assembly resolution condemning Hamas for firing rockets into Israel and “inciting violence.”

The United Nations rejected a United States draft resolution condemning Hamas Thursday, a move the Palestinian government celebrated as a signal of a shift in international alignment towards the support for Palestinian rights.

“It is a slap in the face for the United States which is just pursuing the foreign policy goals of the AIPAC (American Israel Public Affairs Committee) lobby,” political commentator Robert Inlakesh told PressTV Friday.

“The international community, at least a portion of it, are not on board with petty stabs at the Palestinians such as this move,” he added.

U.S. Ambassador to the United Nations Nikki Haley, who will be stepping down at the end of the year, wrote to member states Monday issuing a feeble warning and urging them to vote for the resolution. "The United States takes the outcome of this vote very seriously," she told them.

The draft condemning violence from Hamas against the Israeli occupation, the first to reach the UNGA, received 87 votes in favor, 58 against, and 32 abstentions. A total of 16 countries did not vote. In order to pass, the text needed two-thirds of a vote in favor. Though U.N. Assembly resolutions are non-binding, they can still carry political weight.

The draft resolution failed to mention the Israeli occupation of Palestine and the illegal blockade of the Gaza Strip.

Iran's Deputy U.N. Ambassador Eshagh Al Habib accused the United States of attempting to deflect the attention from the root causes of the conflict. "We recognize Hamas as a legitimate resistance movement fighting for the liberation of Palestinian territory from foreign occupation," he said.

In an official statement, Hamas thanked U.N. member states "that stood by our people's resistance and the justice of their cause" and criticized Haley for supporting "Zionist terrorism in Palestine."

The besieged Gaza Strip is home to two million Palestinians, who have to face shortages of water, electricity, medicine, and food in the context of a crippling air, sea, and land blockade that has lasted for over a decade.