JERUSALEM — On the wall of Prime Minister Benjamin Netanyahu’s office is a giant floor-to-ceiling map with Israel at its center. Mr. Netanyahu likes staring at the map. He regales visitors with stories about how Israel has made friends with so many of the countries shown, some nearby, others far away.

His point is that Israel has moved beyond the days when its conflict with the Palestinians defined its relations with the world. But even as he celebrates the ascension of President-elect Donald J. Trump as a steadfast ally, Mr. Netanyahu may find that it complicates management of his own conservative coalition and undercuts the very diplomatic outreach that has been his central priority.

The 14-to-0 vote by the United Nations Security Council condemning Israeli settlements, permitted on Friday by President Obama, who ordered an American abstention, served as a reminder that the Palestinian issue remains a powder keg. Instead of counting new friends, Mr. Netanyahu was left to tally up old enemies, and in a speech on Saturday night he lashed out, vowing to exact a “diplomatic and economic price” from countries that in his view try to hurt Israel.

He announced that he was cutting off $8 million in contributions to the United Nations and reviewing whether to continue allowing its personnel to enter Israel, in addition to recalling ambassadors and canceling visits from some countries that supported the measure. He accused the departing Obama administration of carrying out a “disgraceful anti-Israel maneuver.”