Initially, Israel's aerial attack on the Hamas militant delegation in Qatar seemed like another intensification that drove the prospect of peace further away.
This strike on September 9 violated the territorial integrity of an US partner and risked expanding the conflict into a region-wide war.
Negotiations seemed to be in ruins.
Instead, it turned out to be a key moment that has led in a agreement, declared by Donald Trump, to release all remaining hostages.
This is a goal that he, and Joe Biden before him, had sought for almost 24 months.
This marks just the first step towards a lasting resolution, and the specifics of Hamas disarmament, Gaza governance and full Israeli withdrawal are still to be negotiated.
Yet if this agreement holds, it could be Donald Trump's defining accomplishment of his second term - one that escaped Biden and his administration.
Trump's distinct approach and key alliances with Israel and the Middle Eastern nations seem to have played a role in this success.
But, as with most foreign policy wins, there were also factors involved beyond the control of either man.
In public, Donald Trump and Benjamin Netanyahu are consistently friendly.
Trump often states that Israel has no greater ally, and the Israeli leader has called him as Israel's "greatest ever ally in the White House". Moreover these warm words have been backed up by actions.
During his initial time in office, Trump relocated the US embassy in the country from Tel Aviv to the contested capital and discarded a long-held US position that Jewish communities in the Palestinian West Bank are against international law, the view under global norms.
When Israel began its air strikes against Iran in June, Trump ordered US bombers to target the nation's nuclear enrichment facilities with its largest non-nuclear weapons.
These visible shows of support may have allowed the president the leeway to apply more pressure on Israel behind the scenes. As per sources, the president's negotiator, Steve Witkoff, browbeat Netanyahu in late 2024 into accepting a temporary ceasefire in return for the freeing of a number of captives.
When Israeli forces attacked against Syria's military in the summer, including bombing a Christian church, Trump urged Netanyahu to change course.
The leader exhibited a level of will and pressure on an Israel's leader that is virtually unprecedented, according to an analyst of the Carnegie Endowment for International Peace. "There is no example of an US leader directly instructing an Israeli prime minister that they must agree or else."
Biden's connection with Netanyahu's government was consistently more strained.
The Biden team's "bear hug strategy" argued that the US had to support the nation publicly in order to allow it to moderate the country's war conduct behind closed doors.
Beneath this was the president's nearly half-century of support for Israel, as well as sharp divisions within his political base over the Gaza War. Every step Biden took risked fracturing his own domestic support, while Trump's solid Republican base provided him more room to manoeuvre.
In the end, internal considerations or individual ties may have had less importance than the simple fact that, throughout Biden's presidency, the Israeli government was not ready to make peace.
Eight months into Trump's second term, with Iran chastened, Hezbollah to its northern border significantly reduced and the coastal strip devastated, every one of its key military goals had been accomplished.
The Israeli missile attack in Doha, which resulted in the death of a Qatari citizen but no Hamas officials, led Trump to deliver an ultimatum to Netanyahu. Hostilities had to end.
The US leader had allowed Israel a significant latitude in Gaza. He provided US armed support to Israel's campaign in the neighboring country. However an strike on Qatari territory was a different matter entirely, pushing him towards the stance of Arab nations on how best to end the war.
Several Trump officials have informed media outlets that this was a decisive moment which galvanised the president to apply maximum pressure to get a peace deal done.
This US president's close ties with the Arab monarchies are widely known. Trump has commercial interests with Qatar and the UAE. The president began both his presidential terms with official trips to Saudi Arabia. This year, Trump also visited in Qatar and the UAE capital.
His Abraham Accords, which normalised relations between Israel and several Muslim states, including the UAE, was the most significant diplomatic achievement of his first term.
His visits he spent in the capitals of the Gulf region earlier this year helped shift his perspective, says an expert of the Council on Foreign Relations. Trump did not travel to Israel on this regional tour but visited the UAE, the kingdom and Qatar where the leader heard consistent appeals to put a stop to the conflict.
Within weeks after that attack on the city, the president sat close as Netanyahu personally phoned the Qatari leadership to apologise. Subsequently, the Israeli leader gave approval on the president's comprehensive proposal for Gaza - one that also had the backing of influential Arab states in the region.
If the president's alliance with his counterpart provided him the room to influence Israel to strike a deal, his past with Muslim leaders may have ensured their backing, and helped them convince Hamas to agree to the arrangement.
"A key factor that evidently occurred was that the US leader developed leverage with the Israeli government, and indirectly with the militants," says Jon Alterman of the a research center.
"That made a difference. The capacity to achieve this on his timing, and avoid yielding to the desires of the combatants has been a challenge that lot of earlier administrations have faced, and he appears to do with some success."
The fact that the president is far better liked in the nation than Netanyahu himself was leverage that he employed to his advantage, he adds.
Currently Israel has agreed to freeing more than 1,000 detainees held in its jails and has consented to a partial withdrawal from the strip.
The group will free all the remaining hostages, both alive and deceased, taken during the original 7 October Hamas attack, which resulted in the loss of more than 1,200 Israelis.
A conclusion to the war, which has resulted in the destruction of Gaza and the fatalities of over 67,000 {Palestinians|Pal