US President Donald Trump has said he has been informed "we are very close to a deal" to end the war in Gaza, after officials reported progress after a third day of indirect talks between Israel and Hamas in Egypt.
A Palestinian official told the BBC that Egyptian, Qatari and Turkish mediators finished seven hours of talks with the Hamas delegation, which included members of other Palestinian groups.
Mediators are meeting Israel's delegation to seek final answers on remaining issues.
Wednesday's talks focused on the first phase of a US peace plan that includes a ceasefire, the release of all hostages in Gaza in exchange for Palestinian prisoners, and Israel's withdrawal from parts of Gaza.
At an unrelated event at the White House on Wednesday, Secretary of State Marco Rubio entered and passed Trump a note, which appeared to ask that Trump approve a Truth Social post about Gaza so that "you can announce first".
Trump said that note informed him that "we are very close to a deal".
He exited the room shortly thereafter, saying he had to focus on the Middle East.
White House Press Secretary Karoline Leavitt said Trump is considering going to the region on Friday.
According to the Palestinian official, there has been good progress on the prisoner-exchange lists and on guarantees to prevent a return to fighting.
Hamas agreed to release all Israeli hostages, while delaying the handover of bodies until field conditions allow.
The Sharm el-Sheikh talks on a 20-point peace plan proposed by Trump are being described as the most significant since the war began.
Trump's envoy Steve Witkoff and his son-in-law, Jared Kushner, arrived to the talks in Egypt on Wednesday along with Qatar's prime minister and Turkey's intelligence chief, seeking to bridge the gaps that could derail a breakthrough.
A senior Hamas official told the BBC on Wednesday morning that it had shown "the necessary positivity" in the negotiations and submitted a list of the prisoners it wants Israel to release in exchange for the 48 hostages still held in Gaza, up to 20 of whom are still alive.
Israeli media cited officials as expressing optimism for a deal.
Israel's Strategic Affairs Minister Ron Dermer, a close confidant of Prime Minister Benjamin Netanyahu, reportedly arrived in the afternoon to lead the Israeli delegation.
Trump previously said the US would do "everything possible to make sure everyone adheres to the deal" if Hamas and Israel could agree one.
It is hoped the presence of heavyweight negotiators will add to the momentum for a deal.
Egypt's President Abdul Fattah al-Sisi called the arrival of Witkoff and Kushner "very encouraging", saying they came "with a strong will, a strong message, and a strong mandate from President Trump to end the war in this round of negotiations".
Kushner previously served as Trump's Middle East adviser during his first term.
Representatives from two other Palestinian armed groups, Islamic Jihad and the Popular Front for the Liberation of Palestine (PFLP), were also present at talks.
Their involvement appeared to be an attempt by Hamas to keep them in line and secure the release of the hostages they are believed to be holding.
The list of prisoners Hamas wants released by Israel includes several of the most prominent Palestinians in Israeli jails, including Marwan Barghouti and Ahmad Saadat.
Barghouti, who is seen as a potential successor to Palestinian Authority President Mahmoud Abbas, is serving five life sentences plus 40 years after being convicted in 2004 of planning attacks that led to five civilians being killed.
Saadat, the leader of the PLFP, was sentenced to 30 years after being convicted in 2008 of heading an "illegal terrorist organisation" and involvement in attacks, including the assassination of an Israeli minister in 2001.
The Hamas official who spoke to the BBC said the group had "shown the necessary positivity and responsibility to achieve the required progress and complete the agreement", but acknowledged that differences remained between the two sides.
"Mediators are making major efforts to remove any obstacles to implementing a ceasefire," he added, noting that "a spirit of optimism is spreading among all participants."
However, a Palestinian official familiar with talks told the BBC that there were "deep gaps" over how Hamas and Israel interpreted Trump's 20-point peace plan.
The official said disagreements had emerged over nearly all the key issues, including the map showing the three phases of Israeli troop withdrawals from Gaza, and the timetable for the hostage-prisoner exchange.
On Wednesday afternoon, mediators presented a withdrawal map described as a compromise between Hamas's demand for troops to pull back to positions they held in March and Israel's demand to stick to the map distributed by the White House last week, which left about 55% of Gaza under Israeli control during the first phase.
A Palestinian source said the mediators were "trying to craft a formula for a gradual and monitored withdrawal", and that their proposed map would leave about 40% of Gaza under Israeli control.
Israel's Haaretz newspaper cited several Israeli security sources as saying on Wednesday afternoon that there was "a high likelihood for progress, with the possibility of closing the deal in the coming days".
The sources added that Trump was himself "intensely involved" in the negotiations.
Earlier, Yedioth Ahronoth reported that Israeli officials were "cautiously optimistic".
On Wednesday, Turkish President Recep Tayyip Erdogan said Trump had asked him during a recent phone call to "persuade" Hamas to accept his plan.
But he told lawmakers from his AK party that it was also important to put pressure on Israel, saying its attacks on Gaza were "the greatest obstacle before the path leading to peace".
The Israeli military appears to have scaled back its ground offensive on Gaza City in recent days following a request from Trump on Friday to "stop the bombing".
Gaza's Hamas-run health ministry said on Wednesday that Israeli fire had killed at least eight people over the previous 24 hours – the lowest death toll it has reported in the past week.
Hospitals said two people had been killed on Wednesday while trying to collect food from aid distribution centres in central and southern Gaza.
The Israeli military meanwhile said its troops had killed "several terrorists" who attempted to attack their position in Gaza City.
Israel launched a military campaign in Gaza in response to the 7 October 2023 attack, in which Hamas-led gunmen killed about 1,200 people and took 251 others as hostages.
At least 67,183 have been killed by Israeli military operations in Gaza since then, including 20,179 children, according to the territory's health ministry. Its figures are seen as reliable by the UN and other international bodies, although Israel disputes them.
The ministry has said another 460 people have died from the effects of malnutrition since the start of the war, including 182 since a famine was confirmed in Gaza City in August by the UN-backed Integrated Food Security Phase Classification (IPC).
Israel's Prime Minister Benjamin Netanyahu has repeatedly denied starvation is taking place in Gaza and said Israel is facilitating deliveries of food and other aid.
Additional reporting by Helen Sullivan
Follow the twists and turns of Trump's second term with North America correspondent Anthony Zurcher's weekly US Politics Unspun newsletter. Readers in the UK can sign up here. Those outside the UK can sign up here.
12 PerFlyer