JERUSALEM — Israeli Prime Minister Benjamin Netanyahu lashed out Saturday at what he called the ‘‘old-world bias against Israel,’’ attacking President Obama and the United Nations over a resolution that criticized Israel’s settlement activity in the West Bank and East Jerusalem.
Netanyahu compared Obama with former US president Jimmy Carter, whom he called hostile to Israel and the last president to break with US commitments to support the state. Those who try to harm Israel will pay a high price, the prime minister said, adding that Israel would fight to cancel Friday’s resolution.
‘‘The resolution is distorted. It states that the Jewish quarter and the Western Wall are occupied, which is absurd,’’ said Netanyahu, referring to holy Jewish sites that sit within the Old City in East Jerusalem.
Netanyahu balanced his harsh words about Obama with his most explicit statement yet in enthusiastic anticipation of Donald Trump’s presidency.
Israeli leaders on Saturday seemed to be counting down the days to Trump’s Jan. 20 inauguration, hoping he will offer a more sympathetic approach to Israel and bring an end to what one senior minister called Obama’s support for ‘‘Palestinian intransigence, incitement, violence, and terror.’’
Later Saturday, Trump tweeted that the UN action ‘‘will make it much harder to negotiate peace. Too bad, but we will get it done anyway!’’
The resolution, which was brought for a vote Friday in the UN Security Council, declared that settlements built on land Israel has occupied since the 1967 Arab-Israeli war have ‘‘no legal validity’’ and are a threat to the possibility of creating two states — one for Israelis and one for Palestinians.
The 15-member council passed the resolution 14 to 0, with the United States, in a break from standard practice, abstaining rather than vetoing. It was the first resolution adopted by the council on Israel and the Palestinians in nearly eight years.
The vote also sparked strong reactions among US lawmakers. On Saturday, Senator Lindsey Graham, a South Carolina Republican, told CNN he will ask Congress to rescind funding for the United Nations unless it repeals the settlements resolution.
‘‘If you can’t show the American people that international organizations can be more responsible, there is going to be a break,’’ Graham said. ‘‘I can’t support funding a body that singles out the only democracy in the Middle East who shares our values.’’
In a statement after the vote, Netanyahu said the Obama administration had ‘‘not only failed to protect Israel against this gang-up at the UN, it has colluded with it behind the scenes.’’
He called the resolution shameful and said Israel would not abide by its terms.
For the first time since the US election, Netanyahu stated clearly that he looked forward to working with Trump, ‘‘to negate the harmful effects of this absurd resolution.’’
Netanyahu and his ministers have generally refrained from making public statements about Trump, but subtle words and gestures have suggested that the Israeli leadership is buoyed by the new administration.
They now seem eager to see the back of Obama, who has clashed regularly with Netanyahu over numerous issues, especially the settlements.
Roughly 400,000 Jewish settlers live on 125 settlements and 100 outposts in the Israeli-occupied West Bank. Over the past six months, Israel has announced plans to add hundreds of units to existing settlements in the West Bank and East Jerusalem, each time drawing rebuke from the White House.
More recently, right-wing voices in Netanyahu’s government have pushed legislation to legalize settlements built on privately owned Palestinian land, a step also frowned upon by the Obama administration.
Trump, on the other hand, has indicated he might bring a fresh approach to the Israeli-Palestinian conflict. Last week, he nominated a close adviser and outspoken supporter of Israel’s settlements, New York lawyer David Friedman, as ambassador to Israel. And on Thursday, he tweeted that ‘‘The resolution being considered . . . should be vetoed.’’
The potential change in direction might explain why there was such urgency to bring the resolution to a vote Friday, as well as the US decision not to veto it.