Resolution fails to gain two-thirds majority needed to pass.

The UN General Assembly narrowly rejected a U.S.-sponsored resolution Thursday seeking to condemn Hamas.

The resolution, backed strongly by Israel and the U.S., needed a two-thirds majority to pass following an earlier vote in the assembly.

The vote ultimately failed to cross the higher threshold, with 87 nations voting in favor and 57 voting against. Thirty-three countries abstained.

The resolution was one of outgoing U.S. UN envoy Nikki Haley’s final actions in the international body before she departs her post at year’s end.

Jason Greenblatt, U.S. President Donald Trump’s chief Middle East peace envoy, lashed out at the vote, calling it “absolutely shameful” on Twitter.

“@UN failed to condemn #Hamas even after years of attacks via suicide bombings, kidnappings, missiles, & more against Israelis. The applause after the vote says it all,” he said.