The vote has been hailed a victory by Palestinians and described as “despicable” by Israel.