Hamas released 12 hostages and Israel released 30 Palestinian prisoners on Tuesday, the fifth day of a fragile ceasefire that has enabled humanitarian aid to flow into Gaza and that mediators hope to extend even as Israel pledges to resume the war.
Israel said 10 of its citizens and two Thai nationals freed by Hamas returned to Israel.
Soon after, Israel released the Palestinian prisoners.
The truce is due to end after one more exchange on Wednesday night.
CIA director William Burns and David Barnea, who heads Israel’s Mossad intelligence agency, were in Qatar, a key mediator with Hamas, to discuss extending the ceasefire and releasing more hostages, a diplomat said.
A US official confirmed Mr Burns was in Qatar.
US secretary of state Antony Blinken is set to visit the region this week, also with an eye to extending the truce.
Israel has vowed to resume the war with “full force” to destroy Hamas once it is clear that no more hostages will be freed under the deal.
The Biden administration has told Israel it must avoid “significant further displacement” and mass casualties among Palestinian civilians if it resumes the offensive, and that it must operate with more precision in southern Gaza than it has in the north, according to US officials.
Hamas and other militants are still holding about 160 hostages out of the 240 seized in their October 7 assault into southern Israel that ignited the war.
Israel has said it is willing to extend the ceasefire by one day for every 10 additional hostages that Hamas releases, according to the deal brokered by Qatar, Egypt and the US.
But Hamas is expected to make much higher demands for the release of captive soldiers.
Israel has vowed to end Hamas’s 16-year rule in Gaza and crush its military capabilities.
That would almost certainly require expanding the ground offensive from northern Gaza to the south, where most of Gaza’s population of 2.3 million is now crowded.
It is unclear where they would go if Israel expands its ground operation, as Egypt has refused to accept refugees and Israel has sealed its border.
The latest group of Israeli hostages freed from Gaza – nine women and a 17-year-old – was flown to hospitals in Israel, the Israeli military said.
Tuesday’s hostage release brought to 60 the number of Israelis freed under the terms of the truce between Israel and Hamas.
An additional 21 hostages – 19 Thais, one Filipino and one Russian-Israeli – have been released in separate negotiations since the truce began.
Earlier in the war, Hamas released four Israeli hostages, and the Israeli army rescued one during its offensive in Gaza.
Two other hostages were found dead in Gaza.
The latest swap brought to 180 the number of Palestinian women and teenagers freed from Israeli prisons.
Most have been teenagers accused of throwing stones and firebombs during confrontations with Israeli forces.
Several released women were convicted by Israeli military courts of attempting to carry out deadly attacks.
The prisoners are widely seen by Palestinians as heroes resisting occupation.
The freed hostages have mostly stayed out of the public eye, but details of their captivity have started to emerge.
In one of the first interviews with a freed hostage, 78-year-old Ruti Munder told Israel’s Channel 13 television that she was initially fed well in captivity but that conditions worsened as shortages took hold.
She said she was kept in a “suffocating” room and slept on plastic chairs with a sheet for nearly 50 days.
Israel imposed a siege on Gaza at the start of the war and only allowed a trickle of food, water, medicine and fuel to enter prior to the ceasefire, leading to widespread shortages and a territory-wide power blackout.
Tuesday saw the first major exchange of fire between Israeli troops and Hamas fighters in northern Gaza since the ceasefire began on Friday.
Each side blamed the other for the outbreak, but no further violence followed and the swap went ahead.
Still, it underscored the fragility of the truce, with the warring sides holding their positions in close proximity to each other.