Israel also released 110 Palestinian prisoners. The swaps are a key part of a ceasefire agreement aimed at ending the war.
Israel has failed to defeat Hamas, but Palestinians in Gaza express mixed feelings about the group remaining in power.