By Andrew Mills and Bassam Masoud, for Reuters
Israel and Palestinian Islamist group Hamas will start a four-day truce on Friday morning (local time) with a first group of 13 Israeli women and child hostages released later that day, mediators in Qatar said.
The agreement - the first in a brutal, near seven-week-old war - would begin at 7am (6pm NZ time) local time and involve a comprehensive ceasefire in north and south Gaza, Qatar's foreign ministry said.
Some aid would start flowing into Gaza and the first hostages including elderly women would be freed at 4pm, with the total number rising to 50 over the four days, ministry spokesperson Majed Al-Ansari said in the Qatari capital Doha.
It was expected Palestinians would be released from Israeli jail, he told reporters. "We all hope that this truce will lead to a chance to start a wider work to achieve a permanent truce."
Hamas - which had been expected to declare a truce with Israel a day earlier on Thursday only for negotiations to drag on - confirmed on its Telegram channel that all hostilities from its forces would cease.
Israel had received an initial list of hostages to be freed from the Gaza Strip and was in touch with families, the Israeli prime minister's office said in a statement that stopped short of confirming a truce had been agreed.
Qatar said an operations room in Doha would monitor the truce and the release of hostages, and had direct lines of communication with Israel, the Hamas political office in Doha and the International Committee of the Red Cross (ICRC).
Egypt - also involved in mediation - is receiving lists of hostages and prisoners that are expected to be released and called on both sides to respect the agreement, Diaa Rashwan, the head of Egypt's state information service, said in a statement.
Israel launched its devastating invasion of Gaza after gunmen from Hamas burst across the border fence, killing 1200 people and seizing about 240 hostages on 7 October, according to Israeli tallies.
Since then, some 13,000 Gazans have been killed by Israeli bombardment, around 40 percent of them children, according to Palestinian health authorities. However they have said it has become increasingly difficult to keep an up-to-date tally as the health service has buckled under the Israeli bombardment.
Both sides have said they will go back to fighting once the truce is over, and there was no sign of any let-up in the violence in the build-up on Thursday.
'We need to know they are alive'
Ahead of the ceasefire, fighting continued at even greater than normal intensity, with Israeli jets hitting more than 300 targets and troops engaged in heavy fighting around Jabalia refugee camp north of Gaza City.
An army spokesman said operations would continue until troops received the order to stop. From across the border fence in Israel, clouds of smoke could be seen billowing above northern Gaza's war zone accompanied by the sounds of heavy gunfire and booming explosions.
In Rafah, on the strip's southern edge, residents combed with bare hands through the ruins of a house smashed in a giant crater. A grey-bearded man wailed amid the shattered masonry while another man lay a hand on his shoulder to comfort him. Neighbour Khaled Hamad told Reuters it was the home of a primary school teacher, killed inside with his children.
Israel says Hamas fighters use residential and other civilian buildings, including hospitals, as cover. Hamas denies this.
The delay to the start of the truce meant another day of worry for Israeli relatives who say they still know nothing about the fate of hostages, and of fear for Palestinian families trapped inside the Gaza combat zone.
"We need to know they are alive, if they're okay. It's the minimum," said Gilad Korngold, desperate for any information about the fate of seven of his family members, including his 3-year-old granddaughter, believed to be among the hostages.
Palestinian media reported at least 15 people killed in air strikes on Khan Younis, Gaza's main southern city. Reuters could not independently verify the toll there.
Israel said its strikes in the past day had hit "military command centres, underground terror tunnels, weapon storage facilities, weapon manufacturing sites, and anti-tank missile launch posts". It released video of troops on foot patrol in rutted streets surrounded by bombed-out ruins.
Israel said on Thursday it had detained the head of Gaza's biggest hospital Al Shifa for questioning over his role in what it said was the hospital's use as a Hamas command centre.
Hamas condemned the arrest of Shifa director Muhammad Abu Salamiya and other doctors it said were trying to evacuate remaining patients and wounded from the facility.
International alarm has focused on the fate of hospitals, especially in Gaza's northern half, where all medical facilities have ceased functioning with patients, staff and displaced people trapped inside.