A US-sponsored draft resolution that would have condemned the militant Islamic group Hamas, which controls Gaza, failed to win the required two-thirds majority in the UN General Assembly on Thursday.
The United States had won crucial backing from the European Union, with all 28 countries supporting the USA measure that would have condemned Hamas for firing rockets into Israel and demanded an end to the violence.
While the US-backed draft resolution got a comfortable majority of votes, it fell short of the two-thirds super-majority needed to pass. Eighty-seven countries voted in favor of the resolution, while 57 opposed it. Thirty-three countries abstained and another 23 were not present.
Sami Abu Zahri, a spokesman for Hamas, the militant group that has ruled the Gaza Strip since 2007, wrote on Twitter after the vote: "The failure of the American venture at the United Nations represents a slap to the U.S. administration and confirmation of the legitimacy of the resistance".
Before the vote on the resolution, the 193-member world body had narrowly voted to require a two-thirds majority for approval as sought by Arab nations for rather than the simple majority urged by the United States.
"She would like to go out with something", said a Security Council diplomat of the US-drafted resolution.
U.S. Ambassador Nikki Haley told the assembly before the vote that it could make history and unconditionally speak out against Hamas, which she called "one of the most obvious and grotesque cases of terrorism in the world".
The vote was a personal defeat for Haley in what is likely to be one of her final major actions as the USA envoy.
Palestinian President Mahmoud Abbas, whose Fatah party has been locked in a power struggle with Hamas, welcomed the resolution's defeat saying, "The Palestinian presidency will not allow for the condemnation of the national Palestinian struggle".
Saudi Arabia's UN Ambassador Abdallah Al-Mouallimi, reflecting the Arab view, said the USA resolution would "undermine the two-state solution which we aspire to". "Is the hatred toward Israel so strong that you'll defend a terrorist organization?" The people who have suffered by far the most because of Hamas are the Palestinian people.
A number of States explained their reasons for voting against the resolution.
Before the final vote, Haley reminded the chamber that last Friday the General Assembly voted six times in one day to condemn Israel.
The rival resolutions reflect the deep divisions among the 193 United Nations member states over the decades-old Israeli-Palestinian conflict - and the failure to end it.
The European Union, like the United States, considers Hamas a terror group.
The resolution was one of U.S. ambassador to the United Nations envoy Nikki Haley's final acts in the worldwide body before she leaves her post at the end of the year.
Prime Minister Benjamin Netanyahu immediately thanked Israel's friends in the United Nations General Assembly in a statement Thursday night.
"The resolution itself was just transparently Israeli talking points - it didn't mention the military occupation, the siege of Gaza, Israel's daily attacks against Palestinians in Gaza and the West Bank".
Haley called condemnation of Hamas "an essential step" to a peace settlement.