US President Donald Trump has announced that Israel and Hamas have "both signed off" on the first phase of a peace plan for Gaza.

"This means that ALL of the Hostages will be released very soon, and Israel will withdraw their Troops to an agreed upon line as the first steps toward a Strong, Durable, and Everlasting Peace," Trump wrote on Truth Social.

The announcement comes after three days of indirect talks in Egypt - mediated by officials from Egypt, Qatar, Turkey and the US - aimed at bringing an end to the two-year conflict.

Both Israel and Hamas also confirmed an agreement had been reached.

However, Trump's post did not provide clarity on other known sticking points in negotiations - notably the disarmament of Hamas and the future governance of Gaza.

But the deal still appeared to be the closest the two sides have come to ending the war which has killed tens of thousands, and drawn in countries including Iran, Lebanon and Yemen.

In a post on X, Israeli Prime Minister Benjamin Netanyahu called it a "great day", adding that he would "convene the government tomorrow to ratify the agreement and bring all of our precious hostages home".

Netanyahu and Trump held a "moving" call, during which they congratulated each other on the "historic achievement" of the agreement, according to the Israeli Prime Minister's Office.

Israeli President Isaac Herzog said: "At this moment the heart of Israel beats as one with the hostages and their families."

Israel says there are currently 48 hostages in captivity, up to 20 of whom are still alive and 28 are dead.

Hamas confirmed that the agreement included an Israeli withdrawal from Gaza, a hostage-prisoner exchange and the entry of aid, adding that they "value the efforts of US President Donald Trump, who seeks to bring about a definitive end to the war".