Israel and Hamas agreed at the last minute on Thursday to extend their ceasefire in Gaza by another day.
But any further renewal of the deal, which has seen dozens of hostages and prisoners released, could prove more challenging since Hamas is expected to demand greater concessions for many of the remaining captives.
Later on Thursday, the Israeli military said two Israeli hostages had been released from captivity in the Gaza Strip.
The army said the Red Cross had transferred the two women to Israeli forces. They were to be taken to an Israeli military base.
Israel is set to free some 30 Palestinian prisoners later on Thursday.
As word of the extension came, gunmen opened fire on people waiting for buses along a main motorway entering Jerusalem, killing at least three and wounding several others, according to police.
The two attackers, brothers from a Palestinian neighbourhood in annexed east Jerusalem, were killed.
Hamas said they were members of its armed wing and celebrated the assault, calling it “a natural response” to Israel’s actions in Gaza and elsewhere.
It is unclear if the attack was ordered by Hamas’s leaders or if it will have an impact on the truce.
International pressure has mounted for the ceasefire to continue for as long as possible after nearly eight weeks of Israeli bombardment and a ground campaign in Gaza that have killed thousands of Palestinians, uprooted more than three-quarters of the population of 2.3 million and led to a humanitarian crisis.
US secretary of state Antony Blinken, who is on his third visit to the region since the start of the war, said “my heart goes out” to the victims of the Jerusalem attack.
Mr Blinken is expected to press for further extensions of the truce and the release of more hostages.
“This process is producing results. It’s important and we hope that it can continue,” he said.
The talks appear to be growing tougher, however, with Hamas having already freed most of the women and children kidnapped during the deadly October 7 attack on Israel that triggered the war.
The militants are expected to make greater demands in return for freeing men and soldiers.
Qatar, which has played a key role in mediating with Hamas, said the truce was being extended on Thursday.
In the past, Hamas has released at least 10 Israeli hostages per day in exchange for Israel’s release of at least 30 Palestinian prisoners.
The announcement followed a last-minute standoff, with Hamas saying Israel rejected a proposed list that included seven living captives and the remains of three who the group said were killed in Israeli airstrikes.
Israel later said Hamas submitted an improved list, but gave no details.
Israel says it will maintain the truce until Hamas stops releasing captives, at which point it will resume military operations aimed at eliminating the group.
US President Joe Biden’s administration has told Israel it must operate with far greater precision if it expands the ground offensive to the south, where many Palestinians have sought refuge.
Israeli Prime Minister Benjamin Netanyahu is under intense pressure from families of the hostages to bring them home.
But his far-right governing partners are also pushing him to continue the war until Hamas is destroyed, and could quit his coalition if he is seen as making too many concessions.
The initial truce — which began on Friday and has now been extended twice — called for the release of women and children.
Israeli officials say Gaza militants still hold around 30 women and children, who will all be released in a few days if the swaps continue at the current rate.
It is not clear how many of the women might be soldiers.
For soldiers and the men still in captivity, Hamas is expected to push for comparable releases of Palestinian men or prominent detainees – a deal Israel may resist.
Israel says around 125 men are still held hostage, including several dozen soldiers.
So far, Hamas has released some men — mostly Thai labourers.
An Israeli official involved in hostage negotiations said talks on a further extension for the release of civilian men and soldiers were still preliminary, and that a deal would not be considered until all the women and children are out.
Thus far, most Palestinians released have been teenagers accused of throwing stones and firebombs during confrontations with Israeli forces. Several were women convicted by Israeli military courts of trying to attack soldiers.
Palestinians have celebrated the release of people they see as having resisted Israel’s decades-long military occupation of lands they want for a future state.
With Wednesday’s releases, a total of 73 Israelis, including dual-nationals, have been freed during the six-day truce, most of whom appear physically well but shaken.
Another 24 hostages — 23 Thais and one Filipino — have also been released.
Before the ceasefire, Hamas released four hostages and the Israeli army rescued one. Two others were found dead in Gaza.
On Thursday, the military confirmed the death of Ofir Tzarfati, who was believed to be among the hostages, without providing any further details.
Israeli media say the 27-year-old attended a music festival where at least 360 people were killed and several others were kidnapped on October 7.
Hamas and other Palestinian militants killed more than 1,200 people — mostly civilians — in their wide-ranging attack across southern Israel that day and captured around 240.
Authorities have only provided approximate figures.
Israel’s bombardment and ground invasion in Gaza have killed more than 13,300 Palestinians, roughly two-thirds of them women and children, according to the Health Ministry in Hamas-ruled Gaza, which does not differentiate between civilians and combatants.
The toll is likely much higher because officials have only sporadically updated the count since November 11. The ministry says thousands more people are feared dead under rubble.
Israel says 77 of its soldiers have been killed in the ground offensive. It claims to have killed thousands of militants, without providing evidence.
During the pause in fighting, Palestinians in Gaza have been consumed by the search for aid and horror at the extent of destruction.
Residents described entire residential blocks as levelled in Gaza City and surrounding areas in the north. The smell of decomposing bodies trapped under collapsed buildings fills the air, said Mohmmed Mattar, a 29-year-old resident of the city who, along with other volunteers, searched for the dead.
In the south, the truce has allowed more aid to be delivered from Egypt, up to 200 lorries a day. But humanitarian officials say it is not enough, given that most now depend on outside aid.
More than one million displaced people have sought refuge in UN-run shelters, with many forced to sleep outside in cold, rainy weather because of overcrowding.
At a distribution centre in Rafah, large crowds line up daily for bags of flour but supplies run out quickly.
“Every day, we come here,” said one woman in line, Nawal Abu Namous.
“We spend money on transportation to get here, just to go home with nothing.”