At first, the Israeli aerial attack on the Hamas delegation in Qatar seemed like another intensification that drove the prospect of peace out of reach.
The attack on 9 September breached the territorial integrity of an US partner and risked widening the conflict into a region-wide war.
Diplomacy appeared to be in ruins.
Instead, it turned out to be a pivotal event that has led in a agreement, declared by Donald Trump, to free all remaining hostages.
This is a objective that Trump, and President Joe Biden before him, had pursued for nearly two years.
It is just the first step 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 Trump's signature achievement of his second term - one that eluded Joe Biden and his administration.
Trump's distinct approach and key alliances with the Israeli government and the Arab world appear to have contributed in this success.
But, as with many foreign policy wins, there were also elements at play beyond the influence of both leaders.
In public, Donald Trump and Israeli Prime Minister Benjamin Netanyahu are consistently friendly.
Trump often states that the nation has no greater ally, and the Israeli leader has called Trump as the country's "greatest ever ally in the US presidency". And these positive statements have been matched by deeds.
Throughout his initial time in office, the president moved the American diplomatic mission in Israel from Tel Aviv to the contested capital and discarded a long-held US position that Israeli settlements in the Palestinian West Bank are against international law, the view under international law.
When Israel began its air strikes against the Islamic Republic in June, Trump ordered American aircraft to strike the nation's atomic sites with its largest non-nuclear weapons.
These public demonstrations of support may have allowed the president the leeway to apply more pressure on Israel in private. According to reports, the president's negotiator, Steve Witkoff, pressured Netanyahu in late 2024 into accepting a temporary ceasefire in return for the freeing of some hostages.
After Israel attacked against Syrian forces in July, even hitting a place of worship, the US president urged Netanyahu to change course.
Trump displayed a level of will and insistence on an Israeli prime minister that is virtually unprecedented, according to an analyst of the a think tank. "It's unheard of of an US leader directly instructing an Israeli leader 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 United States had to support the nation openly in order to enable it to moderate the nation's war conduct behind closed doors.
Beneath this was Biden's nearly half-century of support for the state, as well as sharp divisions within his Democratic coalition over the Gaza War. Each move Biden took risked dividing his own domestic support, whereas Trump's loyal conservative voters provided him more room to manoeuvre.
Ultimately, internal considerations or personal relationships may have had little impact than the simple fact that, during his term, Israel was unwilling to reach an agreement.
Eight months into Trump's second term, with Iran chastened, Hezbollah to its northern border significantly reduced and Gaza devastated, every one of its major strategy objectives had been achieved.
An Israeli strike in the Qatari capital, which resulted in the death of a local national but no Hamas officials, led the president to deliver an final demand to the prime minister. The war had to end.
The US leader had allowed Israel a relatively free hand in Gaza. The president lent American military might to Israeli operations in the neighboring country. But an strike on Qatar soil was a separate issue entirely, moving him towards the stance of Arab nations on how best to end the war.
A number of Trump officials have told media outlets that this was a decisive moment which motivated the president to exert maximum pressure to get a peace deal done.
The leader's close ties with the Arab monarchies are widely known. He has commercial interests with the emirate and the UAE. The president began both his presidential terms with state visits to the kingdom. This year, Trump also visited in Qatar and the UAE capital.
The president's normalization agreements, which normalised relations between the Jewish state and a number of Arab nations, including the Emirates, was the most significant diplomatic achievement of his first term.
The time he spent in the cities of the Gulf region earlier this year helped shift his perspective, says an expert of the a policy institute. The US president did not travel to Israel on this Middle East trip but went to the United Arab Emirates, the kingdom and the state where he heard consistent appeals to bring an end to the war.
Within weeks after that attack on Doha, the president was present nearby as the prime minister himself phoned Qatar to express regret. Subsequently, the prime minister gave approval on Trump's 20-point peace plan for Gaza - one that also had the support of influential Arab states in the region.
Assuming Trump's relationship with Netanyahu gave him the ability to influence the government to strike a deal, his history with Muslim leaders may have secured their backing, and helped them persuade the group to agree to the arrangement.
"One of the things that clearly happened was that President Trump developed influence with the Israelis, and through intermediaries with the militants," says an analyst of the a research center.
"That made a difference. His ability to achieve this on his own schedule, and not succumb to the desires of the combatants has been a challenge that lot of previous presidents have faced, and Trump seems to do relatively successfully."
The reality that the president is much more popular in Israel than Netanyahu personally was an advantage that Trump employed to his benefit, the expert continues.
Currently Israel has agreed to freeing over a thousand Palestinians held in its jails and has consented to a partial withdrawal from Gaza.
The group will free all the captives still held, living and dead, captured in the original 7 October Hamas attack, which resulted in the loss of more than 1,200 Israelis.
An end to the conflict, which has led to the devastation of Gaza and the deaths of more than 67,000 {Palestinians|Pal