JERUSALEM — Israel's prime minister lashed out at President Barack Obama on Saturday, accusing him of a "shameful ambush" at the United Nations over West Bank settlements and saying he is looking forward to working with his "friend" President-elect Donald Trump.

Benjamin Netanyahu's comments came a day after the United States broke with past practice and allowed the U.N. Security Council to condemn Israeli settlements in the West Bank and east Jerusalem as a "flagrant violation" of international law.

Although the U.S. opposes the settlements, it has traditionally used its veto power as a permanent member of the Security Council to block resolutions condemning Israel, saying that disputes between Israel and the Palestinians must be resolved through negotiations.

Welcomed by the Palestinians, the resolution, while mostly symbolic, could hinder Israel's negotiating position in future peace talks.

Trump also condemned the U.N. vote Saturday, taking to Twitter to say it "will make it much harder to negotiate peace." But, he added, "we will get it done anyway."

A year ago, Trump told The Associated Press that he wanted to be "very neutral" on Israel-Palestinian issues, but his comments became much more pro-Israel as the race progressed and he took a sharp tone against the Palestinians.

Netanyahu said the U.S abstention was "in complete contrast" to U.S. commitments — including one that he said Obama made in 2011 — not to impose conditions for a final agreement on Israel at the Security Council.

"The Obama administration conducted a shameful anti-Israel ambush at the U.N.," Netanyahu said.

The White House declined to comment on Netanyahu's criticism.

The U.S. and much of the international community consider Israel's settlements in the West Bank and east Jerusalem as an obstacle to peace. Netanyahu rejects such claims, blaming the failure of peace efforts on the Palestinian refusal to recognize Israel's Jewish identity.

The decision to abstain from vote was one of the biggest American rebukes of its long-standing ally in recent memory and marked a final chapter in the icy relations between Netanyahu and Obama over the last eight years.

Netanyahu called the decision "distorted" but said Israel will overcome it.

He said he had spoken with U.S leaders, both Democrats and Republicans, who vowed to fight the move, including he said, from Israel's "friend" in the incoming administration, the president-elect.

"The decision taken at the U.N. yesterday was part of the swan song of the old world biased against Israel," Netanyahu said. "We are entering a new era and as the President-elect Trump said yesterday, this is going to happen much quicker than people think. In this new era there is a high price for those trying to harm Israel," he said.