The resolution drafted by Arab states is not binding but carries political weight, taking the global temperature as Israel steps up ground operations in Gaza in retaliation for the worst Hamas attack on civilians in Israel's 75-year-old history on Oct. 7.
It passed to a round of applause with 120 votes in favour, while 45 abstained and 14 - including Israel and the United States - voted no. The General Assembly voted after the Security Council failed four times in the past two weeks to take action.
A two-thirds majority was needed for the resolution to pass, in which abstentions do not count.
A Canadian-led bid to amend the resolution to include a rejection and condemnation of the "terrorist attacks by Hamas ... and the taking of hostages" failed to get the two thirds majority needed, garnering 88 votes in favor, 55 against and 23 abstentions.
As fears grow that the conflict could spark a wider war, the assembly stressed the "importance of preventing further destabilization and escalation of violence in the region" and called on "all parties to exercise maximum restraint and upon all those with influence on them to work toward this objective."
The General Assembly called on Israel to rescind its order for civilians in Gaza to move to the south of the enclave. Israel ordered some 1.1 million people in Gaza - almost half the population - to move south on Oct. 12.
The General Assembly also "firmly rejects any attempts at the forced transfer of the Palestinian civilian population."
Israel has vowed to wipe out Hamas, which rules Gaza after the militants killed 1,400 people and took hundreds of hostages in the attack three weeks ago that surprised and shocked Israelis. Israel has struck Gaza from the air, imposed a siege and is preparing a ground invasion. Palestinian authorities say more than 7,000 have been killed.
The General Assembly called for "the immediate and unconditional release of all civilians who are being illegally held captive." It did not name Hamas anywhere in the text.
The initial draft of the resolution put forward by Arab states called for an immediate ceasefire. The resolution adopted "calls for an immediate, durable and sustained humanitarian truce leading to a cessation of hostilities."
Israel has rejected calls for a ceasefire because it says Hamas would benefit.