Israel says its forces have now withdrawn from a key Gaza corridor which means thousands of Gazans can now return home.
The Palestinians were released on Saturday afternoon in exchange for three Israeli civilian hostages whose gaunt appearances caused widespread condemnation.
The three hostages released on Saturday by Hamas appeared to be in much poorer physical condition than any of the other 18 returnees, sparking widespread condemnation among Israeli civic society and human rights groups.
Details of the planned exchange emerged as US President Donald Trump continued to talk up his widely criticised proposal to move all Palestinians out of Gaza and redevelop the Strip as an international travel destination.
It is the first visit of a foreign leader during President Trump’s second term and comes amid waning support for Netanyahu inside Israel.
A three-phase ceasefire agreement between Israel and Hamas took hold in January after months of painstaking negotiations.
The militants released Yarden Bibas, 35, and French-Israeli Ofer Kalderon, 54, in an orderly handover to the Red Cross in the southern Gaza Strip.
The hostages were taken into Gaza following Hamas’ attack on 7 October last year, in which about 1,200 people were killed and 251 were taken hostage overall.
Hundreds of Palestinians began gathering in Wadi Gaza on Saturday hoping to cross back to their homes into the northern part of the Strip.
The families of the released Israeli hostages delivered a joint statement expressing gratitude after being reunited with their loved ones.