However, insiders say some key obstacles to an agreement remain.
Talks on a truce in the Gaza Strip in exchange for the release of hostages taken by Hamas accelerated on Tuesday.
"The movement [Hamas] has delivered its response to the brothers of Qatar and mediators. We are approaching the conclusion of a truce agreement," Hamas leader Ismail Haniyeh said on Tuesday in a brief message sent by his office to AFP.
According to sources within Hamas and Islamic Jihad, the second largest Palestinian militant group, both have accepted an agreement, the details of which are set to be announced by Qatar and other mediators.
The Israeli government did not immediately respond to these statements.
Qatar, Egypt and the United States are working on a deal to free hostages kidnapped in Israel by Hamas in exchange for a truce in the Gaza Strip.
“We have never been closer to an agreement,” said Qatari Foreign Ministry spokesperson Majed Al-Ansari on Tuesday, adding that negotiations were in their “final phase”.
“We are very optimistic and hopeful,” he told reporters at a press briefing in Doha. “We also hope that this mediation will result in a humanitarian truce.”
Earlier US National Security Council spokesperson John Kirby said a deal had "never been closer".
But he warned: "There is still work. Nothing is done until everything is done."
Details of the hostage release
Two sources close to the matter told AFP, a French press agency, on Tuesday that discussions were focused on releasing "50 to 100" hostages in exchange for 300 Palestinian prisoners in Israel, including children and women.
The transfer would take place in stages at the rate of "ten" Israeli hostages against "thirty" Palestinian prisoners per day and would include the entry of food, medical aid and fuel into Gaza and above all a "renewable five-day humanitarian truce".
But Israel insists on "family reunification" - which means if a civilian was released, their partner would also be, even if they were a soldier. Opposed to the release of Israeli troops, this is something Hamas refuses at the moment, according to the two sources cited by AFP.
Relatives of hostages met Monday evening with Israeli Prime Minister Benjamin Netanyahu and his "war cabinet", under pressure to bring the approximately 240 hostages back to Israel.
“Recovering our hostages is a sacred and supreme task and I am committed to it,” declared Netanyahu.
“We will not stop the fighting until we bring our hostages home, destroy Hamas and ensure that there are no more threats from Gaza,” he added.
Bringing the hostages home is one objective of the ongoing Israeli operation in the Gaza Strip, which was launched after Hamas' bloody attack on October 7.
The Palestinian movement claims several hostages have been killed in Israeli airstrikes on Gaza. So far, mediation efforts have led to the release of four. The fate of the rest is unknown.
In Israel, 1,200 people, mostly civilians, were killed in Hamas's shock assault, according to the authorities. It was the deadliest episode in Israel's history.
In retaliation, Israel vowed to "annihilate" Hamas - considered a terrorist organisation by the United States, the European Union and Israel - and has relentlessly shelled Gaza, with its army carrying out a ground offensive since 27 October.
More than 13,300 people have been killed in Israeli bombings in the Gaza Strip, including around 5,600 children, according to Hamas.
The international community has urged Israel to show restraint and follow the rules of war, with some claiming Palestinian civilians are being subjected to collective punishment for Hamas' atrocities.
According to the UN, nearly 1.7 million of the 2.4 million Gazans have been displaced by the war.
Israel's near total siege on the enclave, which blocks deliveries of food, water, electricity and medicine, since 9 October has placed the population in a dire humanitarian situation.