The UN General Assembly approved a Palestinian-backed resolution blaming Israel for violence in Gaza and deploring its "excessive use of force", after narrowly rejecting a US demand to add a condemnation of attacks on Israel by Gaza's Hamas rulers.
Since near-weekly mass protests began March 30 along the Israel-Gaze border, more than 120 Palestinians have been killed and more than 3,800 wounded by Israeli army fire. The overwhelming majority of the dead and wounded have been unarmed, according to Gaza health officials.
Israel's use of potentially lethal force against the protesters has drawn international criticism. Israel accuses Hamas of trying to carry out attacks and damage the border fence under the guise of the protests.
For the Palestinians, the resolution's key provision is a request to UN Secretary-General Antonio Guterres to make proposals within 60 days "on ways and means for ensuring the safety, protection and well-being of the Palestinian civilian population under Israeli occupation", including on "an international protection mechanism".
In the General Assembly, the confrontation over Gaza, reflecting decades-old divisions between Israel and the Palestinians, played out with a few new twists.
Algerian Ambassador Sabri Boukadoum, representing Arab nations, first sought to block a vote on the US amendment, saying it wasn't relevant to the resolution. He said it also undermined reconciliation efforts between rival Palestinian factions Hamas and Fatah, as well as the "remote prospects" of reviving peace negotiations with Israel.
His motion to take "no action" on the amendment was defeated by a vote of 59-78 with 26 abstentions, allowing the US amendment to be put to a vote.
The US amendment was approved by a 62-58 vote, with 42 abstentions. But General Assembly President Miroslav Lajcak declared that under an assembly rule, a two-thirds majority was needed, so the amendment failed.
US Ambassador Nikki Haley appealed, citing another rule that says only a majority vote was required. After a short break, Lajcak put the US appeal to a vote. The US narrowly lost that vote 66-73 with 26 abstentions.
Finally, the assembly voted on the original Palestinian-backed resolution, approving it 120-8 with 45 abstentions.
Ms Haley said in a statement afterward that "in the face of Hamas terrorists routinely inciting violence... today the UN made the morally bankrupt judgment that the recent Gaza violence is all Israel's fault".
"But the common practice of turning a blind eye to the UN's anti-Israel bias is changing," she said. "Today, a plurality of 62 countries voted in favour of the US-led effort to address Hamas's responsibility for the disastrous conditions in Gaza."
The votes on Wednesday reflected wide concern in the 193-member world body that the resolution sponsored by Arab and Islamic nations was one-sided and failed to even mention Hamas, which has fired more than 100 rockets at Israel.
Palestinian Ambassador Riyad Mansour urged the assembly before the vote to address the escalating violence in Gaza and "the crisis" of protecting civilians. He called the US amendment a "bad-faith attempt" to shift the focus away from "the core objective of protecting civilians and upholding international law".
"We need action. We need protection for our civilian population... Is that a crime to ask for?" he said.
"We cannot remain silent in the face of the most violent crimes and human-rights violations being systematically perpetrated against our people," Mr Mansour said.
The resolution deplores "any excessive use of force" by Israeli forces, particularly in Gaza, and demands that Israel "refrain from such actions". It "deplores the firing of rockets from the Gaza Strip against Israeli civilian areas", but doesn't say who is doing the firing.
The Palestinians had initially sought a Security Council resolution after Israel's military killed civilians during the mass protests in Gaza against the border blockade imposed by Israel and Egypt in 2007 after Hamas overran the territory. The US vetoed that resolution on June 1, with Ms Haley calling it "grossly one-sided" for criticising the use of force by Israel while not mentioning Hamas.
Arab and Islamic nations then decided to seek a vote on almost the identical resolution at Wednesday's emergency meeting of the General Assembly, where there are no vetoes.
They followed the same route they took in December after the United States vetoed a Security Council resolution calling on US President Donald Trump to renounce his recognition of Israel as Jerusalem's capital.
The General Assembly largely ignored Trump's threats at the time to cut off aid to any country that went against the US and voted 128-9 to denounce the president's recognition of Jerusalem as Israel's capital and declare it "null and void".
While Security Council resolutions are legally binding, General Assembly resolutions are not, although assembly spokesman Brenden Varma stressed on Wednesday that they do reflect "political will" as well as international opinion.