Qatar is set to host Gaza ceasefire talks on Thursday, seeking a so-far elusive agreement that the United States hopes would stop Iran striking Israel and avert a wider war. US, Qatari and Egyptian mediators have invited Israel and Hamas for negotiations aimed at ending fighting that the Hamas-run Gaza health ministry says has killed nearly 40,000 people in the Palestinian territory. The talks will be held in the Qatari capital Doha, a source close to Hamas and a second source close to the negotiations said Wednesday.

According to a US source familiar with the Doha meeting, CIA director William Burns is scheduled to take part. Israel confirmed it would attend, though it remained unclear if Hamas, whose October 7 attack on Israel triggered the war, planned to participate. Mediation efforts have repeatedly stalled since a week-long ceasefire in November -- the only pause so far in the war -- when dozens of hostages were released by militants in exchange for Palestinian prisoners held in Israeli jails.

A Hamas official said the Islamist movement was "continuing its consultations with the mediators", after demanding the implementation of a proposal that US President Joe Biden laid out on May 31, instead of holding more talks. The phased plan would start with an initial six-week "complete ceasefire", the release of some hostages held in Gaza and a "surge" in humanitarian aid entering the besieged territory as the warring sides negotiate "a permanent end to hostilities", Biden said.