The Security Council approved the resolution with 14 votes, with the US abstaining. There was applause in the chamber following the vote, which represented perhaps the final bitter chapter in the years of antagonism between President Barack Obama's administration and Netanyahu's government.
In an intense flurry of diplomacy that unfolded in the two days before the vote, a senior Israeli official had accused the United States of abandoning the Jewish state with its refusal to block the resolution with a veto.
Trump had also inserted himself in the diplomatic drama, in defiance of the convention that the United States has only one president at a time, by calling on the Obama administration to wield its Security Council veto.
Israel's UN ambassador, Danny Danon, reacted angrily to the vote and issued a sharp parting shot at the Obama administration's role.
"It was to be expected that Israel's greatest ally would act in accordance with the values that we share and that they would have vetoed this disgraceful resolution. I have no doubt that the new US administration and the incoming UN Secretary General will usher in a new era in terms of the UN's relationship with Israel," he said.
In a statement, Netanyahu's office accused the Obama administration of "colluding" with the UN and said it looked forward to working with Trump, as well as Israel-friendly members of Congress, "to negate the harmful effects of this absurd resolution."
The US ambassador to the UN, Samantha Power, raised her hand to abstain in the chamber when the resolution was put to a vote.
Power argued after the vote that opposing settlement expansion was consistent with the bipartisan consensus accepted by every single US president of both parties since Ronald Reagan, in comments that could be seen as a criticism of Trump's position.
"This resolution reflects trends that will permanent destroy the two state solution if they continue on their current course," Power said in a speech before the chamber.
"Our vote today does not in any way diminish the United States' steadfast and unparalleled commitment to the security of Israel," Power said.
The Palestinians were delighted by their rare diplomatic coup.
"This is a victory for the people and for the cause, and it opens doors wide for the demand of sanctions on settlements," said Mustafa Barghouti, a Palestinian leader.
"This is a bias towards justice and international law."
But Trump -- who has vowed to move the US embassy in Israel from Tel Aviv to Jerusalem, and has nominated an ambassador in David Friedman who is supportive of settlers -- pledged that the Palestinians would no longer have a platform at the UN when he is inaugurated next month.
"As to the U.N., things will be different after Jan. 20th," Trump wrote on Twitter.
On Saturday, Trump tweeted, "The big loss yesterday for Israel in the United Nations will make it much harder to negotiate peace. Too bad, but we will get it done anyway!"
The United States and most other nations consider Israeli settlements in the West Bank and east Jerusalem as an obstacle to the hopes of a two-state solution between Israelis and Palestinians.
The Obama administration, which mounted two failed efforts to broker Middle East peace, became increasingly angry about continued Israeli settlement expansion over its eight years in the White House. The Palestinians accuse Israel of trying to establish facts on the ground by building on land they view as part of their future state.
"Today, the United States acted with one primary objective in mind: to preserve the possibility of the two state solution, which every US administration for decades has agreed is the only way to achieve a just and lasting peace between Israelis and Palestinians," Secretary of State John Kerry said in a statement, adding that the US does not "agree with every aspect" of the resolution.
He added: "We cannot in good conscience stand in the way of a resolution at the United Nations that makes clear that both sides must act now to preserve the possibility of peace."
'Secretly cooked up'
Hours before the UN Security Council vote, the Israelis made clear their intense disappointment with the US over the resolution, which calls on Israel to "immediately and completely cease all settlement activities in the occupied Palestinian territory, including East Jerusalem."
"President Obama and Secretary Kerry are behind this shameful move against Israel at the UN," a senior Israeli official told CNN.
"The US administration secretly cooked up with the Palestinians an extreme anti-Israeli resolution behind Israel's back which would be a tailwind for terror and boycotts and effectively make the Western Wall occupied Palestinian territory," a senior Israeli official said.
Before the vote, a Palestinian official said, "We have nothing to say about this. No President has troubled Palestinians in the UN more than President Obama."
The New York Times reported this week
that Obama's advisers did not disclose a position on how the US would vote and were holding out until the vote to see how the matter developed. Ben Rhodes, Obama's deputy national security advisor, told reporters Friday that he wasn't sure if Obama and Trump had spoken about this issue and added he was not aware of any particular conversation.
Rhodes said Obama made the decision this morning, adding that "there's one president at a time."
US and Palestinian officials denied the Israeli accusation of colluding on the UN vote. The resolution was originally put forward by Egypt but it was withdrawn under pressure from the Israelis. Four countries, New Zealand, Venezuela, Malaysia and Senegal, brought it up again for a vote on Friday.
A senior Obama administration official said, "To be clear: from the start, this was an Egyptian resolution. The Egyptians authored it, circulated it, and submitted it for a vote on Wednesday evening before asking for a delay and subsequently removing their sponsorship.
"Contrary to some claims, the administration was not involved in formulating the resolution nor have we promoted it."
A senior Palestinian official told CNN they were not informed how the US would handle the Security Council vote when a delegation was in town earlier this month to urge the administration to support it. The Palestinian official said they did not know how the US would vote and called the Israeli allegation "totally untrue."
Two senior US officials involved in this process vehemently also denied the Israel accusation and also said that the US itself didn't really know how it was going to vote until Thursday morning. The official said Kerry himself was surprised that the Egyptians put the resolution forward so quickly. He was left scrambling to finish his speech and then left scrambling again when the Egyptians delayed the vote on Thursday.
"A veto means support of settlement activities," Saeb Erekat, the Palestinian negotiator, said after the resolution was pulled, according to the Times. "A veto means abandoning the two-state solution and peace efforts."
The UN resolution -- which calls on Israel to "immediately and completely cease all settlement activities in the occupied Palestinian territory, including East Jerusalem" -- was delayed by Egypt after Israeli pressure
The resolution exacerbated divisions between the outgoing Obama administration and incoming Trump administration.
The Obama administration had been weighing whether to support the UN measure or abstain from voting, which would have been a break from the US's traditional practice of shielding Israel at the UN and other international organizations.
The Obama administration has grown increasingly frustrated by Israeli settlement construction and it has repeatedly warned it could foreclose the possibility of a two-state solution with the Palestinian people. The admission of an internal debate about the UN resolution illustrated how unhappy the administration is with the Israeli government.
Israel -- concerned by the outgoing administration's ambivalence -- reached out to Trump for support. An Israeli official told CNN that his country approached the Trump team after it felt that it had failed to persuade the Obama administration to veto the planned vote.
The official said that Israel "implored the White House not to go ahead and told them that if they did, we would have no choice but to reach out to President-elect Trump."
Trump subsequently put out a statement opposing the resolution.
"As the United States has long maintained, peace between the Israelis and the Palestinians will only come through direct negotiations between the parties, and not through the imposition of terms by the United Nations," Trump said. "This puts Israel in a very poor negotiating position and is extremely unfair to all Israelis."
Egyptian President Abdel Fattah Al-Sisi also spoke with Trump by phone about the UN Security Council vote, according to a diplomatic source familiar with the call and an aide Trump. The call was first reported by Reuters.