Israel said it in turn freed 39 Palestinian prisoners.
Hamas terrorists were set to release a third group of Israeli hostages in exchange for Palestinian prisoners on Sunday as a delicate truce held in the two sides' seven-week war.
The Islamist movement's military wing in Gaza said meanwhile that one of its top commanders and three other senior leaders had been killed during Israel's offensive, which was launched in response to deadly attacks by Hamas on October 7.
With a four-day truce deal holding since Friday, there was relief for some families after the second groups of hostages and prisoners walked free despite last-minute disagreements that underlined the fragile nature of the process.
Relatives voiced joy at the return on Saturday of hostages including a nine-year-old Israeli-Irish girl, and cheering crowds greeted Palestinian prisoners as they left a jail in the West Bank.
Four Hamas leaders killed
The ceasefire and hostage-for-prisoner swap brought the first significant relief to both sides since October 7, when Hamas fighters broke through Gaza's militarised border with Israel.
In the deadliest attack in Israel's history, the gunmen snatched around 240 people and killed about 1,200 Israelis and foreigners, according to Israeli authorities.
In response Israel launched an air, artillery and naval bombardment alongside a ground offensive to destroy Hamas, killing nearly 15,000 people, mostly civilians and including thousands of children, according to the Hamas government in Gaza.
Hamas's military wing, the Ezzedine al-Qassam Brigades, said Sunday that its northern brigade commander Ahmed Al-Ghandour and three other senior leaders had been killed, without specifying when.
The group rarely issues public statements about the deaths of its members.
It said Ghandour was a member of its military council and named three other leaders who had died, including Ayman Siyyam, who Israeli media reports said was head of the Brigades' rocket-firing units.
The United States blacklisted Ghandour in 2017 as a "specially designated global terrorist", saying he was involved in numerous operations.
Happiness at hostage release
Among the hostages freed late Saturday was 21-year-old Maya Regev, kidnapped by Hamas fighters in their deadly raid on the Supernova music festival along with her 18-year-old brother Itay.
"I am so excited and happy that Maya is on her way to us now. Nonetheless, my heart is split because my son Itay is still in Hamas captivity in Gaza," their mother Mirit said in a statement.
Emily Hand, the Israeli-Irish nine-year-old, ran into the tight embrace of her father upon her release, a video released by the Israeli Defence Forces showed.
"We are overjoyed to embrace Emily again, but at the same time, we remember... all the hundreds of hostages who have yet to return," her family said.
Among the latest group of Palestinians released was 38-year-old Israa Jaabis, sentenced to 11 years in jail for detonating a gas cylinder at a checkpoint in 2015.
Wearing a wreath of yellow flowers, she hugged relatives in her home.
"Thank God. My pain is visible, no need to speak about it," she said, her face partially disfigured by burns.
"I also have pain on an emotional level and I am missing my relatives. But this is the tax a prisoner pays."
Young prisoners embraced relatives and were carried on their shoulders after leaving Ofer prison in the West Bank where a crowd waved the green flags of Hamas's armed wing.
"May God protect the resistance in Gaza, mercy for our martyrs, and healing for the wounded," said one released prisoner, Wael Bilal Mashy.
AFPTV videos showed Israeli forces firing tear gas to disperse Palestinians gathered near the prison, and paramedics carrying one wounded person on a stretcher.
The latest hostage handover was delayed on Saturday when Hamas said Israel was interfering in the selection of prisoners for release and not allowing aid into northern Gaza.
Hamas later said it relented when Egyptian and Qatari mediators relayed a promise by Israel to uphold the accord.
Israeli officials denied any breach of the ceasefire's terms, describing Hamas's actions as "psychological warfare".
Hamas released 13 Israelis and four Thai hostages at night, officials said.
Israel said it in turn freed 39 Palestinian prisoners.
The office of Israeli Prime Minister Benjamin Netanyahu said it had received a further list of hostages due to be released by Hamas on Sunday.
Hamas has released 26 Israeli hostages in exchange for 78 Palestinian prisoners in the two releases already completed.
The terrorists have also freed a total of 14 Thais and one Filipino.
Hamas is expected to release a total of 50 hostages during the truce in exchange for 150 Palestinian prisoners.
Egypt has said that it received positive feedback from both sides about the idea of extending the truce for a day or two and releasing more hostages and prisoners.
US President Joe Biden told reporters Friday that "the chances are real" for extending the truce.
Jordan's Foreign Minister Ayman Safadi called for "a permanent ceasefire and a complete end to this aggression".
But Israeli armed forces chief Herzi Halevi said Saturday that "immediately at the end of the ceasefire" the war would continue "to dismantle Hamas" and return as many hostages as possible.
Aid trucks enter Gaza
The pause in fighting has allowed more aid to reach Palestinians struggling to survive with shortages of water and other essentials. Israel had placed Gaza under near-total siege.
A total of 61 trucks delivered food, water and medical supplies to northern Gaza on Saturday, the United Nations office for humanitarian affairs said.
Another 187 trucks of vital supplies bound for aid organisations also crossed into the Gaza Strip, it said.
Adnan Abu Hasna, a spokesman for the UN agency for Palestinian refugees (UNRWA), warned of "unprecedented" humanitarian needs.
"We should send 200 lorries a day continuously for at least two months to meet the needs," he said.
The UN estimates that 1.7 million of Gaza's 2.4 million people have been displaced by the fighting.
In the occupied West Bank, Palestinian health authorities said on Sunday that Israeli troops had killed eight Palestinians over a 24-hour period.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)