US President Barack Obama and US Secretary of State John Kerry (L) look on during a meeting with turkish President Recep Tayyip Erdogan at the World Climate Change Conference 2015 (COP21) in Paris, France December 1, 2015. Reuters

JERUSALEM (Reuters) - U.S. President Barack Obama and Secretary of State John Kerry are behind a "shameful" draft anti-settlement resolution at the U.N. Security Council, a senior Israeli government official said on Friday.

It was one of the harshest personal attacks by the government of Prime Minister Benjamin Netanyahu on Obama, coming in the final days of his presidency. The two leaders have had an acrimonious relationship.

"President Obama and Secretary Kerry are behind this shameful move against Israel at the UN," said the official, who asked not to be identified.

"The U.S. 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."

The U.N. Security Council is set to vote on Friday on the resolution demanding an end to Israeli settlement-building, after four council members again put forward the measure, a day after Egypt withdrew it under pressure from Israel and U.S. President-elect Donald Trump.

The 15-member council had been due to vote on Thursday afternoon and Western officials said the United States had intended to allow the draft resolution to be adopted, a major reversal of U.S. practice of protecting Israel from action.

"President Obama could declare his willingness to veto this resolution in an instant but instead is pushing it. This is an abandonment of Israel which breaks decades of U.S. policy of protecting Israel at the U.N.," the Israeli official said.

A settlement in the West Bank. Simone Foxman for Business Insider

U.S. officials have voiced growing fears that a "two-state" solution is imperilled by Israeli settlement-building on land Palestinians want for a state.

A U.S. abstention would have been seen as a parting shot by Obama, who has made the settlements a major target of his peace efforts.

The Israeli far right and settler leadership have been buoyed by the election of Trump, who has signalled a possible change in U.S. policy by choosing as Washington's next ambassador to Israel a fundraiser for a major settlement.

The resolution would demand Israel "immediately and completely cease all settlement activities in the occupied Palestinian territory, including East Jerusalem" and said the establishment of settlements has "no legal validity and constitutes a flagrant violation under international law".

Egypt, currently a Security Council member, worked with the Palestinians to draft the text.

The Palestinians want an independent state in the West Bank, Gaza and East Jerusalem - areas Israel captured in a 1967 war. Most countries and the United Nations view Israeli West Bank settlements as illegal and an obstacle to peace.

(Reporting by Maayan Lubell; editing by Andrew Roche)