JERUSALEM (Reuters) - Benjamin Netanyahu has been unrelenting in his criticism of the Obama administration over what he condemned as its “shameful” decision not to veto a U.N. Security Council resolution calling for a halt to Israeli settlement-building.

U.S. President Barack Obama meets with Israeli Prime Minister Benjamin Netanyahu in New York September 21, 2016. REUTERS/Kevin Lamarque

But with the clock ticking down on Barack Obama’s presidency, a possibly more amenable Republican Donald Trump due to succeed him on Jan. 20 and a $38 billion U.S. military aid package to Israel a done deal, it’s all a calculated risk for the four-term, right-wing Israeli prime minister.

Netanyahu, after what critics are calling a stinging defeat on the international stage, is already maneuvering to mine deep-seated feelings among many Israelis that their country and its policies toward the Palestinians are overly criticized in a world where deadlier conflicts rage.

He has tried to rally Israelis around him by portraying the anti-settlement resolution as a challenge to Israel’s claimed sovereignty over all of Jerusalem.

That was hammered home with an unscheduled Hanukkah holiday visit to the Western Wall, one of Judaism’s holiest sites, which is located in Jerusalem’s Old City in the eastern sector captured along with the West Bank in a 1967 war.

That all of Jerusalem is their country’s capital is a consensus view among Israelis, including those who otherwise have doubts about the wisdom of Netanyahu’s support for settlements on the West Bank.

Palestinians claim eastern Jerusalem as their capital, and Washington has in the past accepted an international view that the city’s status must be determined at future peace talks. Trump has promised to reverse decades of U.S. policy by moving the U.S. embassy to Jerusalem from Tel Aviv.

“I did not plan to be here this evening but in light of the U.N. resolution I thought that there was no better place to light the second Hanukkah candle than the Western Wall,” Netanyahu said during the event.

“I ask those same countries that wish us a Happy Hanukkah how they could vote for a U.N. resolution which says that this place, in which we are now celebrating Hanukkah, is occupied territory?”

Some 570,000 Israelis live in the West Bank and East Jerusalem, which Palestinians want as part of a future state.

At the weekly cabinet meeting on Sunday, Netanyahu brushed aside a White House denial and again accused the Obama administration of colluding with the Palestinians in the U.N. move against the settlements, which are considered illegal by most countries and described as illegitimate by Washington.

Disputing this, Israel cites biblical, historical and political links to the West Bank and Jerusalem, as well as security concerns.

Also on Sunday, an Israeli official said Netanyahu had ordered that until Trump takes office, cabinet ministers refrain from traveling to or meeting officials of countries that voted in favor of the U.N. resolution.

Speaking on MSNBC on Monday, Israel’s ambassador to Washington, Ron Dermer, accused the Obama administration of orchestrating Friday’s U.N. vote behind the scenes, despite U.S. denials.

The diplomatic drama unfolded over the Christmas holiday, with twists and turns unusual even for the serpentine path followed by Netanyahu’s relationship with a Democratic president who opposes settlement building.

On Thursday, Netanyahu successfully lobbied Egypt, which proposed the draft resolution, to withdraw it - enlisting the help of President-elect Trump to persuade Cairo to drop the bid.

But the Israeli leader was ultimately outmaneuvered at the United Nations, where New Zealand, Venezuela, Senegal and Malaysia, resubmitted the proposal a day later.

It passed 14-0, with an abstention from the United States, withholding Washington’s traditional use of its veto to protect Israel at the world body in what was widely seen as a parting shot by Obama against Netanyahu and his settlement policy.

ACCELERATED CONSTRUCTION

A U.S. official said key to Washington’s decision was concern that Israel would continue to accelerate settlement construction in occupied territory and put a two-state solution of the conflict with the Palestinians at risk.

The resolution adopted on Friday at the U.N. changes nothing on the ground between Israel and the Palestinians and likely will be all but ignored by the incoming Trump administration.

However, Israeli officials fear it could spur further Palestinian moves against Israel in international forums.

“The Obama administration made a shameful, underhanded move,” Netanyahu said after the vote. It was some of the sharpest criticism he has voiced against Obama, who got off on the wrong foot with Israelis when he skipped their country during a Middle East visit after first taking office in 2009.

In a further display of anger, Netanyahu summoned the U.S. ambassador to meet him during a day of reprimands delivered at the Foreign Ministry to envoys of the 10 countries with embassies in Israel among the 14 that backed the resolution.

Netanyahu, who is vying with the ultranationalist Jewish Home Party in his governing coalition for right-wing voters, also took aim at what has become a favorite target - an Israeli media he has been painting as left-wing and unpatriotic.

“Leftist political parties and TV commentators have been rubbing their hands in glee over the anti-Israeli decision at the United Nations, almost like the Palestinian Authority and Hamas,” Netanyahu wrote on his Facebook page.

But more trouble for the Israeli leader could be ahead at a planned 70-nation, French-hosted conference on Middle East peace due to convene in Paris on Jan. 15, five days before Obama hands over to Trump.

“(Netanyahu) fears there is a U.S.-French move brewing before January 20th, possibly a declarative step at the French peace convention,” said an Israeli official who attended an Israeli security cabinet session on Sunday.