Initially, Israel's air strike on the Hamas negotiating team in Doha appeared like yet another escalation that drove the hope of a ceasefire out of reach.
This strike on September 9 violated the territorial integrity of an US partner and risked expanding the hostilities into a broader regional conflict.
Negotiations appeared to be in ruins.
However, it turned out to be a key moment that has led in a agreement, announced by Donald Trump, to release all captives still held.
This is a goal that Trump, and Joe Biden previously, had sought for almost 24 months.
It is just the first step towards a lasting resolution, and the specifics of disarming Hamas, Gaza governance and full Israeli withdrawal 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 Biden and his diplomatic team.
The president's distinct approach and crucial relationships with the Israeli government and the Middle Eastern nations appear to have played a role in this breakthrough.
But, as with many diplomatic achievements, there were also elements at play beyond the control of either man.
Publicly, Trump and Benjamin Netanyahu are all smiles.
Trump likes to say that Israel has no greater ally, and the Israeli leader has called him as the country's "most supportive friend in the White House". And these warm words have been backed up by deeds.
During his initial time in office, Trump moved the American diplomatic mission in Israel from its former location to Jerusalem and abandoned a traditional American stance that Jewish communities in the occupied territories are illegal, the position under global norms.
When Israel began its air strikes against Iran in June, Trump directed US bombers to target the nation's atomic sites with its most powerful conventional bombs.
These public demonstrations of support may have given the president the leeway to apply more influence on Israel in private. According to reports, Trump's negotiator, Steve Witkoff, pressured the prime minister in late 2024 into agreeing to a halt in fighting in exchange for the freeing of some hostages.
After Israel launched strikes against Syria's military in the summer, even bombing a place of worship, the US president urged Netanyahu to alter tactics.
Trump displayed a degree of will and pressure on an Israel's leader that is rarely seen, according to Aaron David Miller of the Carnegie Endowment for International Peace. "It's unheard of of an US leader directly instructing an Israeli prime minister that you're going to have to comply or else."
Biden's connection with Netanyahu's government was consistently more strained.
His administration's "close embrace strategy" argued that the US had to support the nation publicly in order to allow it to moderate the nation's military actions behind closed doors.
Beneath this was the president's nearly half-century of backing for Israel, as well as sharp divisions within his political base over the conflict in Gaza. Every step the leader took risked fracturing his own domestic support, whereas Trump's loyal conservative voters provided him more flexibility to manoeuvre.
Ultimately, internal considerations or personal relationships may have had little impact than the simple fact that, throughout his term, Israel was unwilling to reach an agreement.
Eight months into his new administration, with the Islamic Republic chastened, the militant group to its northern border greatly diminished and the coastal strip in ruins, every one of its major strategy objectives had been achieved.
An Israeli strike in Doha, which killed a local national but not the intended targets, led the president to deliver an final demand to Netanyahu. Hostilities had to end.
Trump had allowed Israel a significant latitude in Gaza. He provided US armed support to Israeli operations in the neighboring country. But an strike on Qatar soil was a separate issue entirely, moving him closer to the Arab position on how best to end the war.
A number of administration figures have told media outlets that this was a decisive moment which galvanised the leader to apply full force to finalize an agreement.
This US president's close ties with the Gulf states are well documented. Trump has business dealings with Qatar and the United Arab Emirates. He began each of his administrations with official trips to Saudi Arabia. Recently, he also visited in Doha and the UAE capital.
The president's normalization agreements, which established ties between the Jewish state and a number of Arab nations, such as the UAE, was the most significant diplomatic achievement of his first term.
His visits he spent in the cities of the Gulf region in recent months helped shift his perspective, says Ed Husain of the Council on Foreign Relations. Trump did not visit Israel on this Middle East trip but visited the United Arab Emirates, Saudi Arabia and Qatar where the leader heard consistent appeals to put a stop to the conflict.
Less than a month after that Israeli strike on Doha, Trump sat close as Netanyahu himself phoned the Qatari leadership to express regret. Subsequently, the Israeli leader signed off on Trump's comprehensive proposal for the territory - one that additionally had the support of key Muslim nations in the region.
If Trump's relationship with his counterpart provided him the ability to influence Israel to strike a deal, his history with Arab rulers may have secured their backing, and helped them persuade Hamas to commit to the deal.
"A key factor that evidently occurred was that the US leader developed influence with the Israelis, and through intermediaries with Hamas," says Jon Alterman of the a research center.
"This was crucial. The capacity to do this on his timing, and not succumb to the demands of the combatants has been a challenge that lot of previous presidents have faced, and he seems to do with some success."
The fact that Trump is far better liked in Israel than Netanyahu personally was leverage that he used to his advantage, the expert continues.
Now Israel has agreed to releasing more than 1,000 detainees imprisoned in its jails and has agreed to a partial withdrawal from the strip.
Hamas will free all the remaining hostages, both alive and deceased, captured in the initial October 7 Hamas attack, which resulted in the loss of over 1,200 Israeli citizens.
A conclusion to the conflict, which has led to the destruction of the territory and the fatalities of over 67,000 {Palestinians|Pal
A tech journalist and digital strategist with over a decade of experience covering AI, cybersecurity, and startup ecosystems across Europe.