Updated

A U.S.-sponsored draft resolution that for the first time would have condemned the militant Islamic group Hamas, which controls Gaza, failed to win the required two-thirds majority in the U.N. General Assembly on Thursday.

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.

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."

But the vote on the resolution to condemn Hamas was 87 in favor against 57 opposed, with 33 abstentions — a plurality but below the two-thirds requirement to adopt it. The vote to require a two-thirds majority was much closer, 75-72, with 26 abstentions and several countries changing their votes to "yes" at the last minute.

The U.S. attempt to condemn Hamas and demand that the militant group stop firing rockets into Israel, using "airborne incendiary devices," and putting civilians at risk sparked a Palestinian-backed amendment sponsored by Bolivia.

It outlined the basis for comprehensive Israeli-Palestinian peace and referred to a December 2016 Security Council resolution that condemned Israeli settlements in the West Bank and east Jerusalem as a "flagrant violation" of international law. It also reaffirmed "unwavering support" for a two-state solution to the Israeli-Palestinian conflict — issues not included in the U.S. draft.

But before the vote on the U.S. draft resolution, Bolivian Ambassador Sasha Llorentty Soliz withdrew the amendment.

That was because the Palestinians and their supporters wanted a vote instead on a short rival resolution sponsored by Ireland that included the exact language of the amendment.

After the U.S. draft on Hamas failed to win adoption, the General Assembly overwhelmingly approved the Irish resolution by a vote of 156-6, with 12 abstentions.

It calls for "the achievement, without delay, of a comprehensive and lasting peace in the Middle East" on the basis of U.N. resolutions, singling out the December 2016 measure, and reaffirms "unwavering support ... for the two-state solution of Israel and Palestine, living side by side in peace and security within recognized borders, based on the pre-1967 borders."

The rival resolutions reflect the deep divisions among the 193 U.N. member states over the decades-old Israeli-Palestinian conflict — and the failure to end it.