CAIRO (AP) — Hamas was set to hand over the bodies of four hostages late Wednesday night in exchange for Israel's release of hundreds of Palestinian prisoners, just days before the first phase of the ceasefire between the warring parties was to expire.

Israel has delayed the release of about 600 Palestinian prisoners since Saturday to protest what it says is the cruel treatment of hostages during their release by Hamas. The militant group has said that the delay was a "serious violation" of the ceasefire and that talks on a second phase aren't possible until the Palestinians are freed.

Plans for the release later Wednesday of the hostage bodies were confirmed by Israel's government and by Hamas’s military wing in a statement by Abu Obeida, spokesman of the Qassam Brigades, on the Telegram messaging app.

Prime Minister Benjamin Netanyahu’s office said that the releases of the bodies would be carried out without a ceremony, in a quieter fashion than past Hamas releases, when captives have been made to partake in highly stage-managed ceremonies.

Israel’s prison service said it was making preparations to release hundreds of Palestinian prisoners in exchange. The Palestinian Prisoners Club, a group that represents current and former prisoners, said the release would happen at 11 p.m.

Israel also was expected to release an unspecified number of women and minors detained since the militant group's Oct. 7, 2023 attack on Israel that sparked the conflict.

Hamas previously has released hostages and the bodies of four dead hostages in large public ceremonies during which the Israelis were paraded and forced to wave to large crowds.

Israel, along with the Red Cross and U.N. officials, have said the ceremonies were humiliating to the hostages, and Israel last weekend delayed the scheduled prisoner release in protest.

A fragile ceasefire in peril

A deadlock over the latest exchange had threatened to collapse the ceasefire when the current six-week first phase of the deal expires this weekend.

The latest agreement would complete both sides’ obligations of the first phase of the ceasefire — during which Hamas is returning 33 hostages, including eight bodies — in exchange for nearly 2,000 Palestinian prisoners.

It also could clear the way for an expected visit this week by U.S. President Donald Trump's Middle East envoy, Steve Witkoff, to the region.

Witkoff has said he wants the sides to move into negotiations on the second phase, during which all remaining hostages held by Hamas are to be released and an end to the war is to be negotiated. The Phase 2 talks were supposed to begin weeks ago, but never did.

The ceasefire, brokered by the United States, Egypt and Qatar, ended 15 months of heavy fighting that erupted after Hamas’ 2023 attack on southern Israel that killed about 1,200 people. About 250 people were taken hostage.

Israel's military offensive has killed more than 48,000 Palestinians, according to Palestinian health officials, displaced an estimated 90% of Gaza's population and decimated the territory's infrastructure and health system. The Hamas-run Health Ministry doesn't differentiate between civilian and militant deaths, but it says that over half of the dead have been women and children.

Israel buries mother, sons killed in captivity in Gaza

Tens of thousands of Israelis lined highways as the bodies of a mother and her two young sons, killed in captivity in the Gaza Strip, were taken for burial on Wednesday.

The bodies of Shiri Bibas and her sons, 9-month-old Kfir and 4-year-old Ariel, were handed over earlier this month as part of a ceasefire deal that paused the Israel-Hamas war.

Israel says forensic evidence shows the two children were killed by their captors in November 2023, while Hamas says the family was killed along with their guards in an Israeli airstrike.

Yarden Bibas was abducted separately and released alive in a different handover last month. His wife and their two children were buried in a private ceremony near Kibbutz Nir Oz near Gaza, where they were living when they were abducted. The three were buried in a joint grave next to Shiri's parents, who were also killed in the attack.

Another infant in Gaza dies of hypothermia

With people living in tent camps and damaged buildings in the Gaza Strip, health officials said another infant had died of hypothermia Wednesday, bringing the toll to seven over the past two weeks.

Dr. Munir al-Boursh, director general of Gaza's Health Ministry, said a baby less than two months old died due to the "severe cold wave" that has hit the Palestinian enclave.

Temperatures have been below 10 degrees Celsius (50 degrees Fahrenheit) at night and the last few days have been particularly cold.

___

Lidman reported from Tel Aviv, Israel. Associated Press writer David Rising in Bangkok contributed to this report.

___

Follow AP's war coverage at https://apnews.com/hub/israel-hamas-war

Mourners gather around the convoy carrying the coffins of slain hostages Shiri Bibas and her two children, Ariel and Kfir, during their funeral procession in Rishon Lezion, Israel, Wednesday, Feb. 26, 2025. The mother and her two children were abducted by Hamas on Oct. 7, 2023, and their remains were returned from Gaza to Israel last week as part of a ceasefire agreement with Hamas. (AP Photo/Ariel Schalit)

Credit: AP

icon to expand image

Credit: AP

A four-story home belonging to the Tamboura family, which was struck by an Israeli airstrike on Oct. 20, 2023, stands in ruins in Beit Lahiya, northern Gaza Strip, Friday, Feb. 21, 2025. (AP Photo/Abdel Kareem Hana)

Credit: AP

icon to expand image

Credit: AP

Tents are seen among the destroyed buildings in the Gaza Strip as seen from southern Israel, Tuesday, Feb. 25, 2025. (AP Photo/Ohad Zwigenberg)

Credit: AP

icon to expand image

Credit: AP

Rawya Tamboura and her son Yazan wash dishes next to their home, which was struck by an Israeli airstrike on Oct. 20, 2023, in Beit Lahiya, northern Gaza Strip, Friday, Feb. 21, 2025. (AP Photo/Abdel Kareem Hana)

Credit: AP

icon to expand image

Credit: AP