The Israeli and Hamas negotiators ne'er came look to look - but by the end, conscionable 1 level separated them.
Ceasefire talks via middlemen from Qatar, Egypt and the US had been dragging connected for respective months, astatine times without hope. Now the cardinal players were each wrong 1 gathering successful Doha and the gait was frantic.
A woody was adjacent but things had gone incorrect before: 1 root described a last-minute propulsion to halt the statement breaking down portion a podium was being acceptable up truthful the Qatari premier curate could denote it.
"Literally, negotiations were up until 10 minutes earlier the property conference. So that's however things were stitched up astatine the past minute," the root acquainted with the talks said.
The BBC has spoken to a fig of officials connected each sides of the negotiations to portion unneurotic however the last fraught days of the secretive process unfolded.
Shifting ground
The woody did not travel retired of the blue.
The wide model of the statement reached connected 15 January was broadly the aforesaid arsenic the connection acceptable retired by President Joe Biden during a White House code past May. It uses the aforesaid three-phase attack and volition spot a ceasefire, Israeli hostages released successful instrumentality for Palestinian prisoners, and the Israeli military's gradual withdrawal from Gaza.
But sources acquainted with the discussions agreed the dynamics of the talks shifted decisively successful mid-December and the gait changed.
Hamas, already reeling from Israel's sidesplitting of its person Yahya Sinwar successful Gaza 2 months earlier, had go progressively isolated. Its Lebanon-based state Hezbollah had been decimated and had agreed to a truce with Israel. Bashar al-Assad's Iran-backed authorities successful Syria had besides been swept away.
The presumption successful Washington is that Hamas was forced to wantonness the thought that "the cavalry was coming to prevention it", arsenic 1 US authoritative enactment it.
"It is hard to overstate however fundamentally the equation changed and what that [did] for Hamas's calculus," says a elder Biden medication authoritative acquainted with the talks.
An Israeli authoritative who wished to stay anonymous said Hamas was "not successful a rush" to onslaught a woody and had been "dictating" alternatively than negotiating. They said that changed aft the decease of Sinwar and Israeli operations against Hamas's allies successful the region.
On apical of that, the authoritative said, determination was "momentum created by some US administrations" - the Biden White House and the incoming Trump team.
"We could not execute a woody similar this until conditions had changed," the authoritative added.
On 12 December, Biden's negotiating squad visited Israeli Prime Minister Benjamin Netanyahu. White House nationalist information advisor Jake Sullivan, Middle East envoy Brett McGurk and CIA manager Bill Burns were each successful attendance.
A US official, who spoke connected the information of anonymity, said the gathering lasted "multiple hours" and focused connected the "new determination equation" and "how we catapult from the Lebanon ceasefire into different circular of intensive discussions" connected Gaza.
There was besides different portion connected the chessboard by this stage: Donald Trump.
On 16 December, weeks aft Trump's victory, the BBC spoke to a Hamas authoritative who was unusually optimistic astir the ceasefire efforts, suggesting they seemed to beryllium much serious.
The authoritative - who had taken portion successful each acceptable of talks since November 2023 - appeared reassured by the information that an advisor to the incoming US president had sent a connection to mediators indicating Trump wanted an statement earlier his inauguration.
Trump had besides warned of "all hellhole to pay" if Hamas did not hold to merchandise the hostages - but the Palestinian authoritative was bullish.
"This time, the unit volition not beryllium constricted to Hamas, arsenic was customary nether the Biden administration," the authoritative said. "There volition besides beryllium unit connected Netanyahu. He is the 1 obstructing the deal, and Trump seems to recognize that precise well."
False dawns
However, that aforesaid official's prediction that a woody could beryllium done by Christmas proved to beryllium optimistic.
During December, the process remained beset by problems. Israel publically ruled retired releasing definite high-profile prisoners, portion the White House accused Hamas of throwing up roadblocks implicit the hostage releases.
A Biden medication authoritative said: "Hamas [was] refusing to hold - and this was a breakdown astatine that constituent - to the database of hostages that would beryllium released successful signifier 1 of the deal.
"That's conscionable truthful fundamental. This is simply a hostage merchandise deal. Unless you hold to the database of hostages who volition travel out, there's not going to beryllium a deal."
The aforesaid authoritative said Hamas made "completely untrue" claims astir not knowing the determination of the hostages, and added: "We held the enactment and fundamentally near the array until Hamas agreed to the hostage list."
An anonymous Israeli authoritative said Hamas had sought to conceal the fig of surviving hostages and "tried to dictate that they would nonstop america lone dormant bodies".
For its part, Hamas claimed Israel unexpectedly added 11 names to the database of hostages it wanted to beryllium released successful the archetypal phase. Hamas considered them reserve soldiers, and truthful not eligible to beryllium released alongside the women, injured and aged hostages owed to beryllium released successful signifier one.
The doorway was near unfastened to Qatari and Egyptian mediators to proceed their efforts and connected 3 January, determination was an evident breakthrough erstwhile Hamas projected the merchandise of 110 Palestinian prisoners serving beingness sentences successful return.
There were by present well-established presumption of notation for specified trades. For each hostage Hamas was to release, Israel would person to supply what had go known successful the nomenclature of the draught woody arsenic a "key" - meaning an agreed fig oregon adjacent circumstantial identities of Palestinian prisoners.
A US authoritative said: "There's an equation for however galore Palestinian prisoners travel out. So for pistillate soldiers, for example, there's a key. And for aged males, there's a key. And for women civilians, there's a key. And this has each been worked retired and the prisoners person been named, hundreds and hundreds of prisoners connected the list."
The speech record successful the negotiations - Palestinian prisoners for hostages held by Hamas - became known arsenic "the keys".
During this signifier of the talks, Hamas besides relented connected 2 long-standing demands: the implicit withdrawal of Israeli forces from Gaza successful the archetypal signifier and a ceremonial Israeli committedness to a full ceasefire.
Sensing a breakthrough, the Egyptian mediator urgently dispatched Major General Ahmed Abdel Khaleq - who oversees the Palestinian portfolio successful Egyptian quality - to Doha. After gathering with Hamas representatives, helium secured confirmation the radical would marque what a elder Hamas authoritative described arsenic "painful concessions."
But connected 6 January, according to a Palestinian official, Israel rejected the connection enactment guardant by Hamas connected the 11 hostages. Hamas responded by sending the BBC and different media outlets a database featuring the names and ages of 34 Israeli hostages. Two days later, the assemblage of 1 of those connected that database - Yosef AlZayadni - was recovered wrong Gaza.
The database included reserve soldiers, which indicated Hamas was consenting to merchandise them successful the archetypal phase.
This appeared to beryllium an effort to embarrass Netanyahu and rally hostage families successful Israel and astir the satellite to unit him into accepting the deal.
It was besides an denotation Hamas had not walked away.
Metres apart
Meetings stretching into the tiny hours of Doha's blistery evenings became communal during the last agelong of the negotiations.
In the past month, they had developed into alleged "proximity talks", with some sides successful the aforesaid two-storey building, according to aggregate accounts from officials acquainted with the details.
A elder US authoritative said Hamas's delegation was connected the archetypal level and Israel's connected the level above. Mediators ran pieces of insubstantial betwixt them. Maps of Israeli unit withdrawal proposals and details astir hostages oregon prisoners drafted for merchandise were shuttled backmost and forth.
"That takes an tremendous magnitude of enactment and, I person to say, each of that was not afloat nailed down, really, until conscionable the [final] hours," said the official.
Inside the building, the delegations met separately with elder figures from Qatar and Egypt. Among those intimately progressive successful the details was Qatari Prime Minister Mohammed bin Abdulrahman Al Thani.
Two important areas were worked connected successful the last phases of the talks: the lists for merchandise of hostages held by Hamas and Palestinian prisoners held by Israel, and the positions for Israeli unit withdrawals from populated areas successful Gaza during signifier one.
By 9 January, the unit had escalated. Trump's envoy, Biden's envoy, and the Egyptian quality main convened successful Doha for a superior eight-hour dialog session.
A elder Egyptian authoritative told the BBC: "We are astatine the closest constituent to reaching an agreement."
Agreement had been reached connected 90% of the outstanding issues, but further talks were required.
Steve Witkoff, Trump's precocious appointed Middle East envoy, was dispatched to Tel Aviv to conscionable Netanyahu. Though not yet officially successful post, the New York spot tycoon had go much and much progressive successful the talks, which Trump was taking a keen involvement in.
He was astir to beryllium sent connected an duty that proved to beryllium pivotal.
End game
When Trump's antheral successful the Middle East arrived successful Israel connected 11 January, it was the sabbath.
Witkoff was asked to hold until the sabbath had ended earlier helium met Netanyahu but, successful a breach of custom, the envoy refused and demanded to conscionable the premier curate immediately.
Netanyahu appears to person travel nether superior strong-arming during the gathering and the involution from the Trump campy to get the Israeli authorities to acceptable speech its last reservations seems to person been critical.
The gathering was reportedly fractious and the connection to Netanyahu from the incoming president was clear: Trump wants a woody - present get it done.
Commenting connected those talks, an Israeli authoritative who asked to stay anonymous said it was a "very important meeting".
When Witkoff returned to Doha, helium remained successful the country with the talks, spending clip with Biden's envoy Mr McGurk, successful what 2 US officials called a "near unprecedented" modulation effort successful American diplomacy.
This week, Hamas authoritative Bassem Naim told Al Arabiya helium "couldn't ideate that [the deal] could beryllium imaginable without the unit of the incoming medication led by President Trump" - and specifically cited Witkoff's beingness astatine the talks.
By now, the information a woody could beryllium imminent was retired successful the unfastened and nationalist anticipation was gathering - not slightest among the families of those being held hostage and Palestinians displaced wrong Gaza.
The last 72 hours of talks progressive a changeless backmost and distant implicit the finer points of however the woody would beryllium implemented, according to 1 account.
One root adjacent to the negotiations described the hammering retired of "arrangements and logistics" for however the hostages would beryllium released successful Gaza and for the withdrawal movements of Israeli troops.
On 12 January, a elder Palestinian authoritative acquainted with the negotiations said "all the officials are present successful the aforesaid building", adding: "Tonight is decisive. We are lone a fewer steps distant from an agreement."
That gathering lasted six hours - but, similar truthful galore times before, an impasse was reached.
This clip the disagreement that arose was implicit the mechanics for the instrumentality of displaced individuals from confederate Gaza to the north.
Israel wanted to hunt returnees and their vehicles to guarantee nary militants oregon subject instrumentality were being transported - which Hamas refused to accept.
Mediators projected that Qatari and Egyptian method teams behaviour the searches instead. Both sides agreed and 1 of the last remaining stalemates was resolved.
On 15 January soon aft 18:00, a Hamas negotiator wrote successful a connection to the BBC: "Everything is finished."
The podium was being readied.
A woody which erstwhile looked intolerable had taken shape.
Additional reporting by Sean Seddon