Israel and Hamas have agreed a deal which would halt the war in Gaza and see the release of Israeli hostages and Palestinian prisoners, the US and mediators Qatar have said.
It is the most significant breakthrough in 15 months of war, which began when the armed Palestinian group Hamas attacked Israel in October 2023.
What is in the ceasefire deal between Israel and Hamas?
Details of the deal reportedly approved by both sides have not yet been officially announced.
As it stands, a completed deal would see the war in Gaza stop, an exchange of hostages and prisoners, the withdrawal of Israeli troops and return of displaced Palestinians.
Hamas seized 251 hostages when it attacked Israel in October 2023. It is still holding 94 captive, although Israel believes that only 60 are still alive.
Israel is expected to release about 1,000 Palestinian prisoners, some jailed for years, in return for the hostages.
How would the ceasefire work?
This ceasefire is expected to happen in three stages.
And while both sides are now said to have agreed to it, Israel’s security cabinet and government will need to approve the deal before it can be implemented.
Qatari Prime Minister Sheikh Mohammed bin Abdul Rahman Al Thani said the agreement would come into effect on Sunday should it be approved.
Here is what is understood to be in the deal.
First stage
The first stage would last six weeks and see “a full and complete ceasefire”, US President Joe Biden said as he confirmed a deal had been reached on Wednesday.
Hostages in Gaza and Palestinian prisoners in Israel would be freed, and Gazans who have been displaced allowed to start returning home.
“A number of hostages” held by Hamas, including women, the elderly and the sick, would be released in exchange for hundreds of Palestinian prisoners, Biden said.
He did not specify how many hostages would be released during this first stage – but Qatar’s Al Thani told a news conference on Wednesday that it would be 33.
Israeli government spokesman David Mencer previously said most but not all of the 33 – which include children – were thought to still be alive.
Three hostages would be released straight away, a Palestinian official previously told the BBC, with the rest of the exchange taking place over the six weeks.
During this stage, Israeli troops would pull out of “all” populated areas of Gaza, Biden said, while “the Palestinians [could] also return to their neighbourhoods in all the areas of Gaza”.
Almost all of Gaza’s 2.3 million people have had to leave their homes because of Israeli evacuation orders, Israeli strikes and fighting on the ground.
There would also be a surge in humanitarian aid deliveries to Gaza, with hundreds of lorries allowed in each day.
The Palestinian official previously said detailed negotiations for the second and third stages would begin on the 16th day of the ceasefire.
Biden said the ceasefire would persist “as long as the negotiations continue”.
Second stage
Stage two would be “a permanent end to the war,” according to Biden.
The remaining living hostages, including men, would be released in return for more Palestinian prisoners.
Of the 1,000 Palestinian prisoners Israel is thought to have agreed to release overall, about 190 are serving sentences of 15 years or more.
An Israeli official previously told the BBC that those convicted of murder would not be released into the occupied West Bank.
There would also be a full withdrawal of Israeli troops from Gaza.
Third stage
The third and final stage would involve the reconstruction of Gaza – something which could take years – and the return of any remaining hostages’ bodies.
What are the unanswered questions about the deal?
Getting to this point has taken months of painstaking indirect negotiations, not least because Israel and Hamas completely distrust each other.
Hamas wanted a complete end to the war before it would release the hostages, something which was unacceptable to Israel.
The ceasefire will in effect pause the war while its terms are carried out.
However, it is unclear whether it will mean the war is over for good.
One of Israel’s key war aims has been to destroy Hamas’s military and governing capabilities. Although Israel has severely damaged it, Hamas still has some capacity to operate and regroup.
It is also unclear which hostages are alive or dead or whether Hamas knows the whereabouts of all those who remain unaccounted for.
For its part, Hamas has demanded the release of some prisoners which Israel says it will not free. This is believed to include those who were involved in the 7 October attacks.
It is also not known whether Israel will agree to pull out of the buffer zone by a certain date, or whether its presence there will be open-ended.
Any ceasefire is likely to be fragile.
Ceasefires between Israel and Hamas which have halted previous wars have been shaken by skirmishes and eventually broken down.
The timetable and complexity of this ceasefire means even a small incident could turn into a major threat.
What happened on 7 October 2023 and what has happened in Gaza?
Hundreds of Hamas-led gunmen launched an unprecedented attack on southern Israel, bursting through the border fence and targeting communities, police stations and army bases.
About 1,200 people were killed and more than 250 hostages were taken back to Gaza. Hamas also fired thousands of rockets into Israel.
Israel responded with a massive military campaign, first by air and then a ground invasion. Since then, Israel has attacked targets across Gaza by land, sea and air, while Hamas has attacked Israel with rockets.
Israel’s offensive has devastated Gaza and led to severe food shortages, with aid struggling to reach those most in need. More than 46,700 people – the majority of them civilians – have been killed by Israel’s attacks, according to Gaza’s Hamas-run health ministry.