The United States has allowed the UN Security Council to condemn Israeli settlements in the West Bank and east Jerusalem as a "flagrant violation" of international law.

In the striking rupture with past practice, the outgoing administration of President Barack Obama brushed aside Donald Trump's demands that the US exercise its veto.

It also provided a climax to years of icy relations with Israel's leadership.

The decision to abstain from the council's 14-0 vote is one of the biggest American rebukes of its longstanding ally in recent memory.

It could have significant ramifications for the Jewish state, potentially hindering Israel's negotiating position in future peace talks.

Given the world's widespread opposition to settlements, the action will be almost impossible for anyone, including Mr Trump, to reverse.

Nevertheless, the president-elect vowed via Twitter: "As to the UN, things will be different after Jan 20th."

The resolution said Israel's settlements in lands the Palestinians want to include in their future state have "no legal validity". It demanded a halt to such activities for the sake of "salvaging the two-state solution".

Loud applause erupted in the council chamber after US ambassador Samantha Power permitted the resolution to pass.

Friday's condemnation, a day after Egypt suddenly postponed a scheduled showdown, capped days of frantic diplomacy in capitals around the world.

American officials indicated they would have been prepared to let the resolution pass, despite blocking such proposals for years. Israeli officials said they were aware of such plans and turned to Mr Trump for support.

The president-elect sent a tweet urging Mr Obama to block the UN effort. Egypt then pulled its resolution, with US officials citing fierce Israeli pressure as the reason.

Israeli officials accused Mr Obama of colluding with the Palestinians in a "shameful move" against the Jewish state. Washington denied the charge.

Most of the world is opposed to Israel's construction of Jewish settlements in lands it seized in the 1967 war.

The primary holdout at the UN has been the United States, which sees settlements as illegitimate but has traditionally used its veto power as a permanent member of the Security Council to block such resolutions on the grounds that Israeli-Palestinian disputes should be addressed through negotiation.

Underscoring that unity, Friday's resolution was proposed by nations in four different parts of the world: Malaysia, New Zealand, Senegal and Venezuela. It is the first resolution on settlements to pass in 36 years, Malaysia's UN ambassador Ramlan Bin Ibrahim said.

Explaining the US vote, Ms Power quoted a 1982 statement from then-US president Ronald Reagan, which declared that Washington "will not support the use of any additional land for the purpose of settlements".

"That has been the policy of every administration, Republican and Democrat, since before President Reagan and all the way through to the present day," she said.

Settlement activity, she added, "harms the viability of a negotiated two-state outcome and erodes prospects for peace and stability in the region".

She noted that until Friday, Mr Obama was the only president in the last half-century that did not have a Security Council resolution on the Israeli-Palestinian conflict pass on his watch.

"One would think that it would be a routine vote," Ms Power said. But she acknowledged that, in reality, the vote was "not straightforward" because it occurred at the United Nations, a body that has singled out Israel for criticism for decades.

Chief Palestinian negotiator Saeb Erekat hailed the result as a "victory for the justice of the Palestinian cause". He said Mr Trump's choice was now between "international legitimacy" or siding with "settlers and extremists".

But Israeli prime minister Benjamin Netanyahu's office voiced anger.

"Israel rejects this shameful anti-Israel resolution at the UN and will not abide by its terms," it said, blaming Mr Obama for failing to "protect Israel against this gang-up at the UN" and even colluding with the country's detractors.

"Israel looks forward to working with President-elect Trump and with all our friends in Congress, Republicans and Democrats alike, to negate the harmful effects of this absurd resolution," the statement said.

In some ways, the American abstention served as a direct reflection of the deep distrust between Mr Obama and Mr Netanyahu.

It followed months of intensely secret deliberations in Washington, including what one official said was an unannounced meeting earlier this month between Mr Obama and Secretary of State John Kerry, and a spate of fresh Israeli settlement announcements that have wrought exasperation and anger from American officials.

Mr Trump has signalled he will be far more sympathetic to Israel's stances on the two territories, where some 600,000 Israelis live.

His campaign platform made no mention of the establishment of a Palestinian state, a core policy objective of Democratic and Republican presidents over the past two decades.

He also has vowed to move the US Embassy from Tel Aviv to Jerusalem, which would anger Palestinians and lack international support. His pick for ambassador to Israel, Jewish-American lawyer David Friedman, is a donor and vocal supporter of the settlements.

The resolution is little different in tone or substance from Mr Obama's view, with the exception of its language on the legality of settlements.

Washington has long avoided calling the activity illegal, in part to maintain diplomatic wiggle room for a negotiated solution that would allow Israel to incorporate some of the larger settlement blocs.

While the resolution does not impose sanctions on Israel, it enshrines the world's disapproval of the settlements. A reversal would require a follow-up vote that avoids a veto from the US, Britain, China, France or Russia - an highly unlikely scenario given the current stalemate in the Israeli-Palestinian peace process.

In Washington, Republicans were already threatening consequences.

Senator Lindsey Graham, who heads the Senate appropriations panel in charge of US payments to the global body, said he would "form a bipartisan coalition to suspend or significantly reduce" such funding. He said countries receiving US aid also could be penalised for backing the effort.

In a Hanukkah message on Friday, Mr Obama did not mention the matter.

He referenced Israel once, noting that Jews there and around the world would soon "gather to light their Hanukkah menorahs, display them proudly in the window and recall the miracles of both ancient times and the present day".