At first, the Israeli air strike on the Hamas militant negotiating team in Doha appeared like yet another escalation that pushed the prospect of a ceasefire further away.
This strike on September 9 violated the territorial integrity of an American ally and risked expanding the conflict into a broader regional conflict.
Negotiations seemed to be collapsing.
Instead, it proved to be a pivotal event that culminated in a deal, declared by President Donald Trump, to release all captives still held.
That represents a objective that Trump, and Joe Biden before him, had sought for almost 24 months.
This marks just the initial phase towards a more durable peace, and the details of Hamas disarmament, Gaza governance and complete Israeli pullout remain to be negotiated.
Yet if this deal stands, it could be Donald Trump's signature achievement of his return to office - one that escaped Joe Biden and his administration.
The president's distinct approach and key alliances with the Israeli government and the Middle Eastern nations seem to have played a role in this breakthrough.
But, as with most diplomatic achievements, there were also elements at play beyond the influence of either man.
Publicly, Trump and Israeli Prime Minister Benjamin Netanyahu are consistently friendly.
Trump likes to say that the nation has no better friend, and the Israeli leader has called Trump as Israel's "greatest ever ally in the US presidency". Moreover these warm words have been backed up by deeds.
Throughout his first presidential term, Trump relocated the US embassy in the country from its former location to Jerusalem and abandoned a traditional American stance that Israeli settlements in the occupied territories are against international law, the view under international law.
When Israel began its bombing campaign against Iran in June, Trump directed American aircraft to target the nation's nuclear enrichment facilities with its largest non-nuclear weapons.
Those visible shows of support may have given Trump the leeway to exert more influence on the Israeli government in private. As per sources, the president's envoy, Steve Witkoff, browbeat Netanyahu in late 2024 into accepting a temporary ceasefire in return for the freeing of a number of captives.
After Israel launched strikes against Syrian forces in July, even hitting a place of worship, the US president pressured his counterpart to change course.
The leader exhibited a degree of determination and pressure on an Israeli prime minister that is rarely seen, according to Aaron David Miller of the a think tank. "There is no example of an US leader 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 always more tenuous.
The Biden team's "close embrace approach" argued that the United States had to support the nation publicly in order to enable it to moderate the country's military actions in private.
Beneath this was the president's decades-long of backing for Israel, as well as sharp divisions within his political base over the Gaza War. Each move the leader took risked fracturing his own domestic support, while Trump's loyal conservative voters gave him more room to manoeuvre.
Ultimately, internal considerations or personal relationships may have had less importance than the reality that, throughout his term, Israel was not ready to reach an agreement.
Several months into his new administration, with Iran weakened, the militant group to its northern border significantly reduced and Gaza devastated, all its key military goals had been achieved.
The Israeli missile attack in the Qatari capital, which killed a local national but not the intended targets, led the president to issue an ultimatum to the prime minister. The war had to end.
The US leader had given the Israeli military a relatively free hand in Gaza. He provided US armed support to Israel's campaign in Iran. But an strike on Qatari territory was a separate issue entirely, moving him closer to the Arab position on how best to conclude the conflict.
A number of administration figures have informed media outlets that this was a turning point which galvanised the president to apply full force to finalize an agreement.
The leader's close ties with the Arab monarchies are well documented. Trump has business dealings with the emirate and the UAE. The president began each of his administrations with official trips to the kingdom. Recently, he also stopped in Qatar and the UAE capital.
The president's normalization agreements, which established ties between Israel and several Muslim states, including the UAE, was the most significant diplomatic achievement of his first term.
The time devoted in the cities of the Gulf region in recent months helped shift his perspective, says Ed Husain of the Council on Foreign Relations. The US president did not travel to Israel on this Middle East trip but visited the UAE, the kingdom and Qatar where he received consistent appeals to put a stop to the war.
Within weeks after that Israeli strike on the city, the president was present nearby as the prime minister himself called the Qatari leadership to express regret. And later that day, the Israeli leader signed off on Trump's comprehensive proposal for Gaza - one that additionally had the support of key Muslim nations in the area.
Assuming Trump's alliance with his counterpart provided him the room to influence Israel to strike a deal, his history with Arab rulers may have ensured their backing, and assisted them convince the group to agree to the deal.
"A key factor that clearly happened was that the US leader developed leverage with the Israelis, and indirectly with the militants," notes Jon Alterman of the a research center.
"This was crucial. The capacity to achieve this on his own schedule, and avoid yielding to the demands of the combatants has been a problem that many earlier administrations have struggled with, and Trump seems to do with some success."
The fact that the president is much more popular in Israel than the prime minister himself was an advantage that he employed to his benefit, he adds.
Currently Israel has agreed to freeing over a thousand detainees held in Israeli prisons and has agreed to a partial withdrawal from the strip.
The group will free all the captives still held, both alive and deceased, taken in the initial October 7 assault, which caused the loss of over 1,200 Israelis.
A conclusion to the conflict, which has led to the devastation of Gaza and the fatalities of more than 67,000 {Palestinians|Pal
A gaming industry analyst with over a decade of experience in slot technology and market trends, based in Berlin.