At first, the Israeli air strike on the Hamas delegation in Qatar appeared like another intensification that pushed the prospect of peace out of reach.
This strike on 9 September violated the territorial integrity of an American ally and risked widening the hostilities into a region-wide war.
Negotiations appeared to be collapsing.
However, it turned out to be a pivotal event that has led in a agreement, declared by President Donald Trump, to free all captives still held.
This is a objective that he, and Joe Biden previously, had sought for almost 24 months.
It is just the initial phase towards a lasting resolution, and the details of Hamas disarmament, Gaza governance and full Israeli withdrawal are still to be worked out.
Yet if this deal holds, it could be Trump's defining accomplishment of his second term - one that escaped Biden and his diplomatic team.
The president's unique style and crucial relationships with the Israeli government and the Arab world seem to have played a role in this success.
But, as with many diplomatic achievements, there were also factors at play beyond the influence of either man.
Publicly, Trump and Benjamin Netanyahu are consistently friendly.
The president often states that Israel has no better friend, and Netanyahu has described him as the country's "greatest ever ally in the US presidency". And these warm words have been backed up by deeds.
During his first presidential term, Trump relocated the US embassy in Israel from its former location to Jerusalem 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 the Israeli military began its air strikes against the Islamic Republic in the summer, the US leader ordered US bombers to target the Iran's nuclear enrichment facilities with its most powerful conventional bombs.
Those visible shows of backing may have allowed the president the room to exert more pressure on Israel in private. As per sources, Trump's negotiator, Steve Witkoff, browbeat the prime minister in the latter part of the year into agreeing to a temporary ceasefire in exchange for the release of some hostages.
When Israeli forces attacked against Syrian forces in July, including bombing a Christian church, Trump pressured his counterpart to change course.
Trump displayed a level of will and pressure on an Israel's leader that is rarely seen, says Aaron David Miller of the a think tank. "It's unheard of of an American president literally telling an Israeli prime minister that they must agree or else."
Joe Biden's relationship with Netanyahu's government was consistently more tenuous.
His administration's "bear hug strategy" argued that the US had to support Israel publicly in order to allow it to influence the nation's war conduct behind closed doors.
Beneath this was the president's decades-long of backing for Israel, as well as sharp divisions within his Democratic coalition over the Gaza War. Each move Biden took endangered fracturing his own domestic support, while his successor's solid Republican base provided him more flexibility to act.
Ultimately, internal considerations or individual ties may have had little impact than the simple fact that, during his term, Israel was not ready to reach an agreement.
Eight months into his new administration, with Iran weakened, Hezbollah to its immediate north significantly reduced and Gaza in ruins, all its key military goals had been achieved.
An Israeli strike in Doha, which resulted in the death of a local national but no Hamas officials, led the president to deliver an ultimatum to Netanyahu. The war had to end.
The US leader had given the Israeli military a significant latitude in Gaza. He provided US armed support to Israeli operations in the neighboring country. However an strike on Qatari territory was a different matter completely, pushing him towards the Arab position on how best to conclude the conflict.
A number of Trump officials have informed media outlets that this was a turning point which motivated the president to exert maximum pressure to get a peace deal done.
The leader's close ties with the Gulf states are widely known. Trump has business dealings with Qatar and the UAE. The president began both his presidential terms with official trips to Saudi Arabia. Recently, he also visited in Qatar and the UAE capital.
The president's Abraham Accords, which established ties between the Jewish state and several Muslim states, such as the Emirates, was the biggest foreign policy success of his first term.
The time 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. The US president did not visit the country on this Middle East trip but visited the UAE, Saudi Arabia and the state where he heard consistent appeals to bring an end to the conflict.
Less than a month after that attack on Doha, the president sat nearby as the prime minister personally phoned Qatar to express regret. Subsequently, the Israeli leader signed off on the president's comprehensive proposal for the territory - one that also had the support of influential Arab states in the region.
Assuming Trump's relationship with his counterpart provided him the room to pressure the government to strike a deal, his past with Arab rulers may have ensured their support, and assisted them convince the group to agree to the deal.
"One of the things that clearly happened was that President Trump gained influence with the Israelis, and indirectly with the militants," notes Jon Alterman of the Center for Strategic and International Studies.
"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 earlier administrations have faced, and Trump appears to handle with some success."
The fact that Trump is much more popular in the nation than Netanyahu himself was an advantage that Trump employed to his benefit, the expert continues.
Currently Israel has agreed to releasing over a thousand Palestinians imprisoned in Israeli prisons and has agreed to a partial withdrawal from Gaza.
The group will free all the remaining hostages, living and dead, captured during the initial October 7 assault, which resulted in the loss of more than 1,200 Israeli citizens.
A conclusion to the war, which has resulted in the devastation of Gaza and the fatalities of over 67,000 {Palestinians|Pal
A mindfulness coach and digital wellness advocate with over a decade of experience in helping individuals achieve balance in the modern world.