Hamas is preparing to release more than a dozen hostages for several dozen Palestinian prisoners held by Israel, part of an exchange on the second day of a ceasefire that has allowed humanitarian aid into the Gaza Strip and given civilians their first respite after seven weeks of war.

While uncertainty remained around the details of the exchange, there was optimism, too, amid the scenes of joyous families reuniting on both sides.

On the first day of the four-day ceasefire, Hamas released 24 of the about 240 hostages taken during its October 7 attack on Israel that triggered the war, and Israel freed 39 Palestinians from prison.

Those freed in Gaza were 13 Israelis, 10 Thais and a Filipino.

On Saturday, Hamas provided mediators Egypt and Qatar with a list of 14 hostages to be released, and it has been passed to Israel, according to an Egyptian official. A second Egyptian official confirmed the details.

The head of Egypt’s government press office and the state-run Qahera news outlet said 13 hostages would be exchanged for 39 prisoners.

Under the truce agreement, Hamas will release one Israeli hostage for every three prisoners freed. Israel’s Prison Service said earlier on Saturday it was preparing 42 prisoners for release.

It was not immediately clear how many non-Israeli captives may also be released.

During the four days of the ceasefire, Hamas is due to release at least 50 Israeli hostages, and Israel will free 150 Palestinian prisoners.

A helicopter carrying hostages released by Hamas lands at Schneider Children’s Medical Centre in Israel
A helicopter carrying hostages released by Hamas lands at Schneider Children’s Medical Centre in Israel (Ohad Zwigenberg/AP)

Israel has said the truce can be extended an extra day for every additional 10 hostages freed — something United States President Joe Biden said he hoped would come to pass.

Separately, a Qatari delegation arrived in Israel on Saturday to co-ordinate with parties on the ground and “ensure the deal continues to move smoothly”, according to a diplomat briefed on the visit.

The start of the truce on Friday morning brought the first moment of quiet for 2.3 million Palestinians reeling and desperate from relentless Israeli bombardment that has killed thousands, driven three quarters of the population from their homes and levelled residential areas.

Rocket fire from Gaza militants into Israel went silent as well.

For Emad Abu Hajer, a resident of the Jabaliya refugee camp in the Gaza City area, the pause meant he could again search through the rubble of his home, which was flattened in an Israeli attack last week.

He found the bodies of a cousin and nephew, bringing the death toll in the attack to 19. With his sister and two other relatives still missing, he resumed his digging on Saturday.

Marah Bakir, right, a former Palestinian prisoner who was released by the Israeli authorities, is welcomed at her family home
Marah Bakir, right, a former Palestinian prisoner who was released by the Israeli authorities, is welcomed at her family home (Mahmoud Illean/AP)

“We want to find them and bury them in dignity,” he said.

The United Nations said the pause enabled it to scale up the delivery of food, water and medicine to the largest volume since the resumption of humanitarian aid convoys on October 21.

It was also able to deliver 34,078 gallons of fuel – just over 10% of the daily pre-war volume – as well as cooking gas.

In the southern city of Khan Younis on Saturday, a long line of people with fuel cans and other containers waited outside a filling station hoping to get some of the newly delivered fuel.

For the first time in more than a month, aid reached northern Gaza, the focus of Israel’s ground offensive. A UN convoy delivered flour to two facilities sheltering people displaced by fighting.

The UN said it and the Palestinian Red Crescent Society were also able to evacuate 40 patients and family members from a hospital in Gaza City, where much of the fighting has taken place, to a hospital in Khan Younis.

Palestinians walk through Gaza City
Palestinians walk through Gaza City as the temporary ceasefire between Israel and Hamas took effect (Mohammed Hajjar/AP)

The relief brought by the ceasefire has been tempered, however, for both sides – among Israelis by the fact that not all hostages will be freed and among Palestinians by the brevity of the pause. The short truce leaves Gaza mired in a humanitarian crisis and under the threat that fighting could soon resume.

Israel has vowed to resume its massive offensive once the truce ends. That has clouded hopes that the deal could eventually help wind down the conflict, which has fuelled a surge of violence in the occupied West Bank.

After nightfall on Friday, a line of ambulances emerged from Gaza through the Rafah Crossing into Egypt carrying the freed hostages. The freed Israelis included nine women and four children aged nine and under.

The released hostages were taken to three Israeli hospitals for observation. The Schneider Children’s Medical Centre said it was treating eight Israelis — four children and four women — and that all appeared to be in good physical condition.

It said they were also receiving psychological treatment, adding that “these are sensitive moments” for the families.

Israel Palestinians
An Israeli prison transport vehicle carries Palestinian prisoners released by the Israeli authorities from Ofer military prison (Mahmoud Illean/AP)

At a plaza dubbed Hostages Square in Tel Aviv, a crowd of Israelis celebrated at the news.

Yael Adar spotted her mother, 85-year-old Yaffa Adar, in a TV broadcast of the release and was cheered to see her walking.

“That was a huge concern, what would happen to her health during these almost two months,” she told Israel’s Channel 12.

But Yael’s 38-year-old son, Tamir Adar, remains in captivity. Both were kidnapped on October 7 from Kibbutz Nir Oz. “Everyone needs to come back. It’s happiness locked up in grief,” she said.

The hostages included multiple generations. Nine-year-old Ohad Munder-Zichri was freed along with his mother, Keren Munder, and grandmother, Ruti Munder.

The boy was abducted during a holiday visit to his grandparents at the kibbutz where about 80 people — nearly a quarter of all residents of the small community — are believed to have been taken from.

A convoy of Israeli army vehicles near Israel’s border after leaving Gaza on Friday
A convoy of Israeli army vehicles near Israel’s border after leaving Gaza on Friday (Tsafrir Abayov/AP)

The plight of the hostages has raised anger among some families that the government of Prime Minister Benjamin Netanyahu was not doing enough to bring them home.

Hours later, 24 Palestinian women and 15 teenage boys held in Israeli prisons in the occupied West Bank and east Jerusalem were freed. In the West Bank town of Beitunia, hundreds of Palestinians poured out of their homes to celebrate, honking horns and setting off fireworks that lit up the night sky.

The teenagers had been jailed for minor offences such as throwing stones. The women included several convicted of trying to stab Israeli soldiers, and others who had been arrested at checkpoints in the West Bank.

“It’s a happiness tainted with sorrow because our release from prison came at the cost of the lives of martyrs and the innocence of children,” said one released Palestinian prisoner, Aseel Munir al-Titi.

The war erupted when several thousand Hamas militants stormed into southern Israel, killing some 1,200 people, mostly civilians, and taking scores of hostages, including babies, women and older adults, as well as soldiers.

Majed al-Ansari, a spokesperson for the Foreign Ministry of Qatar, said the hope is that momentum from the deal will lead to an end to the violence. Qatar served as a mediator along with the US and Egypt.

Palestinians flee to northern Gaza
Palestinians flee to northern Gaza (Mohammed Dahman/AP)

But hours before it came into effect, Israeli defence minister Yoav Gallant told troops that their respite would be short and that the war would resume with intensity for at least two more months.

Mr Netanyahu has also vowed to continue the war to destroy Hamas’s military capabilities, end its 16-year rule in Gaza and return all the hostages.

The Israeli offensive has killed more than 13,300 Palestinians, according to the Health Ministry in the Hamas-run Gaza government.

Women and children have consistently made up around two thirds of the dead, though the latest number was not broken down. The figure does not include updated numbers from hospitals in the north, where communications have broken down.

The ministry says some 6,000 people have been reported missing, feared buried under rubble. The ministry does not differentiate between civilians and militants in its death tolls.

Israel says it has killed thousands of Hamas fighters, without presenting evidence for its count.