At first, Israel's aerial attack on the Hamas delegation in Doha appeared like yet another intensification that drove the hope of a ceasefire out of reach.
The attack on 9 September violated the territorial integrity of an US partner and threatened widening the conflict into a broader regional conflict.
Diplomacy seemed to be collapsing.
Instead, it turned out to be a key moment that has led in a agreement, declared by Donald Trump, to release all remaining hostages.
That represents a goal that Trump, and Joe Biden before him, had pursued for nearly two years.
This marks just the first step towards a lasting resolution, and the details of Hamas disarmament, administering Gaza and complete Israeli pullout are still to be negotiated.
But if this deal holds, it could be Trump's defining accomplishment of his return to office - one that escaped Joe Biden and his diplomatic team.
Trump's unique style and crucial relationships with Israel and the Middle Eastern nations appear to have contributed in this breakthrough.
But, as with many diplomatic achievements, there were also factors at play beyond the control of either man.
Publicly, Trump and Israeli Prime Minister Benjamin Netanyahu are all smiles.
The president often states that Israel has no better friend, and the Israeli leader has called Trump as the country's "most supportive friend in the White House". And these warm words have been backed up by actions.
Throughout his initial time in office, the president moved the American diplomatic mission in Israel from Tel Aviv to Jerusalem and abandoned a long-held US position that Israeli settlements in the occupied territories are against international law, the position under global norms.
After the Israeli military began its bombing campaign against the Islamic Republic in the summer, the US leader ordered American aircraft to target the Iran's nuclear enrichment facilities with its most powerful conventional bombs.
Those public demonstrations of backing may have allowed Trump the leeway to apply more pressure on the Israeli government in private. As per sources, Trump's negotiator, Steve Witkoff, pressured the prime minister in late 2024 into accepting a temporary ceasefire in return for the release of some hostages.
When Israel launched strikes against Syria's military in the summer, even hitting a Christian church, Trump urged Netanyahu to change course.
Trump exhibited a degree of will and insistence on an Israel's leader that is virtually unprecedented, according to Aaron David Miller of the Carnegie Endowment for International Peace. "There is no example of an American president literally telling an Israeli prime minister that you're going to have to comply or else."
Joe Biden's relationship with Netanyahu's government was consistently more strained.
His administration's "close embrace approach" held that the United States had to embrace Israel publicly in order to enable it to influence the nation's war conduct in private.
Underneath this was Biden's nearly half-century of backing for Israel, as well as sharp divisions within his Democratic coalition over the conflict in Gaza. Each move Biden took endangered fracturing his own domestic support, while his successor's solid Republican base gave him more flexibility to manoeuvre.
In the end, internal considerations or individual ties may have had little impact than the simple fact that, during his term, the Israeli government was unwilling to make peace.
Several months into Trump's second term, with the Islamic Republic weakened, Hezbollah to its immediate north significantly reduced and Gaza devastated, all its key military goals had been accomplished.
An Israeli strike in the Qatari capital, which killed a Qatari citizen but not the intended targets, led Trump to issue an ultimatum to Netanyahu. The war had to stop.
The US leader had given Israel a significant latitude in the territory. He provided American military might to Israeli operations in Iran. However an attack on Qatar soil was a separate issue completely, moving him closer to the stance of Arab nations on how best to end the war.
A number of Trump officials have informed the press that this was a decisive moment which motivated the leader to apply full force to get a peace deal done.
The leader's strong connections with the Gulf states are widely known. Trump has commercial interests with the emirate and the UAE. The president began both his presidential terms with state visits to the kingdom. This year, he also visited in Qatar and Abu Dhabi.
His Abraham Accords, which established ties between Israel and several Muslim states, such as the Emirates, was the biggest foreign policy success of his first term.
The time devoted in the capitals of the Arabian Peninsula earlier this year contributed to shift his perspective, says Ed Husain of the a policy institute. Trump did not visit the country on this Middle East trip but visited the United Arab Emirates, the kingdom and the state where he received repeated calls to bring an end to the war.
Less than a month after that attack on the city, the president was present nearby as Netanyahu personally phoned Qatar to express regret. Subsequently, the Israeli leader signed off on the president's comprehensive proposal for the territory - one that additionally had the support of key Muslim nations in the region.
If the president's relationship with Netanyahu provided him the ability to influence the government to strike a deal, his history with Arab rulers may have ensured their support, and helped them persuade the group to commit to the deal.
"A key factor that clearly happened was that the US leader developed leverage with the Israeli government, and through intermediaries with the militants," says Jon Alterman of the Center for Strategic and International Studies.
"That made a difference. His ability to achieve this on his timing, and avoid yielding to the demands of the combatants has been a challenge that many earlier administrations have struggled with, and Trump appears to do relatively successfully."
The reality that Trump is far better liked in Israel than Netanyahu personally was an advantage that he used to his advantage, the expert continues.
Now the Israeli government has agreed to releasing more than 1,000 Palestinians held in its jails and has agreed to a partial withdrawal from the strip.
The group will free all the captives still held, living and dead, captured during the initial October 7 Hamas attack, which resulted in the loss of more than 1,200 Israeli citizens.
An end to the conflict, which has led to the destruction of the territory and the deaths of more than 67,000 {Palestinians|Pal
A seasoned gaming analyst with over a decade of experience in casino slot mechanics and player strategy optimization.