The United Nations General Assembly on Thursday rejected a resolution proposed by the United States to condemn the Islamic militant group Hamas for violence against Israel. The rejection was a blow to the American ambassador, Nikki R. Haley, who had positioned the measure as a capstone of her tenure.

In remarks before the vote, Ms. Haley characterized the resolution as an opportunity for the 193 member states of the General Assembly to put themselves on the side of “truth and balance.”

Though the body has voted many times to condemn Israel, never once has it passed a resolution critical of Hamas, an organization Ms. Haley described as one of the “most obvious and grotesque cases of terrorism in the world.”

“Today could be a historic day at the United Nations or it could be just another ordinary day,” said Ms. Haley, who announced in October that she would be resigning, perhaps by year’s end.