Israel and Hamas have agreed a ceasefire deal in the Gaza war and to release some hostages, the Qatari prime minister has announced, after 15 months of conflict.
A week before US president-elect Donald Trump takes over from president Joe Biden, a breakthrough was achieved in talks in Doha, on an agreement that is due to come into effect on Sunday.
Qatari prime minister Mohammed bin Abdulrahman Al Thani said measures would be taken in the coming days to enforce the agreement.
Hamas killed around 1,200 people in a terror attack on southern Israel on 7 October 2023, and abducted another 250. Some 100 Israelis are still being held captive inside the Gaza Strip, and the military believes at least a third of them are dead.
Israel’s retaliatory offensive killed more than 46,000 Palestinians, more than half of them women and children, according to Gaza’s health ministry, which does not say how many of the dead were combatants.
Here is everything we know about the deal:
How many hostages will be returned?
Over six weeks, 33 of the nearly 100 hostages are to be reunited with their loved ones after months in in captivity with no contact with the outside world, although it’s unclear whether all are alive.
They include children, women including female soldiers, men above 50 and the wounded and sick.
Hamas will release the hostages over a six-week period, with at least three freed each week and the remainder of the 33 before the end of the period. Living hostages will be released first, followed by remains of dead hostages
Israel will release 30 Palestinian detainees for every civilian hostage and 50 Palestinian detainees for every Israeli female soldier Hamas releases.
The first stage will last up to 60 days.
Israel will also release all Palestinian women and children under 19 detained since 7 October 2023 by the end of the first phase. The total number of Palestinians released will depend on hostages released, and could be between 990 and 1,650 Palestinian detainees including men, women and children.
The second and most difficult phase will mark the end of the war, President Biden said. It will include the release of all remaining living hostages, including male soldiers, and Israeli forces would withdraw from Gaza. The third phase calls for the start of a major reconstruction of Gaza, which faces decades of rebuilding from devastation caused by the war.
In return for the hostages, Israel will free from its jails more than 1,000 Palestinians held in Israeli jails, including convicts serving long sentences for deadly attacks. Where the prisoners would be sent has not yet been agreed but anyone convicted of murder or deadly attacks would not be released to the occupied West Bank. And anyone from Hamas who took part in the October 7 attack on Israel would not be released.
Negotiations over a second phase of the agreement will begin by the 16th day of phase one.
Will Israeli troops withdraw from Gaza?
The full withdrawal of Israeli troops from Gaza was a key Hamas demands for releasing the remaining captives.
The withdrawal will be phased, with Israeli forces remaining in the border perimeter to defend Israeli border towns and villages.
The first phase involves Israeli forces pulling out of densely populated areas of Gaza and the return of displaced unarmed Palestinians to northern Gaza.
There would be security arrangements at the Philadelphi corridor bordering Egypt, along the southern edge of Gaza, with Israel withdrawing from parts of it after the first few days of the deal.
The Rafah crossing between Egypt and Gaza will start to work gradually, allowing the passage of those who are sick and humanitarian cases out of the enclave for treatment.
Will aid be allowed to enter Gaza Strip?
The deal requires 600 truckloads of humanitarian aid to be allowed into Gaza every day of the ceasefire, 50 of them carrying fuel, and 300 of the trucks allocated to the north of the strip.
Israel allows aid into the enclave but there have been disputes over the amount allowed in, as well as the amount that reaches people in need, with looting by criminal gangs an increasing problem.
Who will take control of Gaza?
A third phase is expected to include the return of all remaining dead bodies and the start of Gaza’s reconstruction, supervised by Egypt, Qatar and the United Nations.
It appears that the talks left the issue of control out of the proposal because of its complexity and the likelihood it would hold up a limited deal.
Israel has said it will not end the war leaving Hamas in power. It has also rejected administration of Gaza by the Palestinian Authority, the Western-backed body set up under the Oslo interim peace accords three decades ago that exercises limited sovereignty in the occupied West Bank.
It has also said from the beginning of its military campaign in Gaza that it will retain security control over the enclave after the fighting ends.
The international community has said Gaza must be run by Palestinians, but efforts to find alternatives to the main factions among civil society or clan leaders have proved largely fruitless.
However, there have been discussions between Israel, the United Arab Emirates and the United States over a provisional administration that would run Gaza until a reformed Palestinian Authority is able to take charge.
Reuters contributed to this report