A tech journalist and AI researcher with over a decade of experience covering digital innovations and emerging technologies.
At first, the Israeli aerial attack on the Hamas delegation in Doha appeared like another escalation that pushed the hope of a ceasefire out of reach.
This strike on September 9 breached the sovereignty of an US partner and risked expanding the hostilities into a region-wide war.
Diplomacy appeared to be in ruins.
However, it proved to be a key moment that has led in a deal, declared by President Donald Trump, to release all captives still held.
That represents a goal that he, and Joe Biden before him, had pursued for almost 24 months.
This marks just the initial phase towards a more durable peace, and the specifics of Hamas disarmament, Gaza governance and full Israeli withdrawal remain to be worked out.
But if this agreement holds, it could be Donald Trump's defining accomplishment of his second term - one that escaped Joe Biden and his administration.
Trump's unique style and crucial relationships with Israel and the Arab world seem to have played a role in this success.
But, as with most foreign policy wins, there were also elements at play beyond the control of both leaders.
In public, Donald Trump and Benjamin Netanyahu are consistently friendly.
Trump often states that Israel has no better friend, and Netanyahu has called Trump as the country's "greatest ever ally in the US presidency". And these positive statements have been backed up by deeds.
Throughout his initial time in office, the president relocated the American diplomatic mission in the country from Tel Aviv to Jerusalem and discarded a long-held US position that Jewish communities in the occupied territories are illegal, the view under global norms.
When Israel began its air strikes against Iran in the summer, Trump directed US bombers to strike the nation's nuclear enrichment facilities with its largest non-nuclear weapons.
Those visible shows of support may have allowed the president the leeway to exert more influence on the Israeli government behind the scenes. According to reports, the president's negotiator, his representative, browbeat the prime minister in late 2024 into agreeing to a halt in fighting in exchange for the freeing of some hostages.
When Israeli forces launched strikes against Syrian forces in July, even bombing a place of worship, the US president pressured Netanyahu to alter tactics.
Trump displayed a level of will and pressure on an Israel's leader that is virtually unprecedented, says an analyst of the Carnegie Endowment for International Peace. "It's unheard of of an US leader literally telling an Israeli leader that they must agree or else."
Joe Biden's connection with Netanyahu's government was always more strained.
His administration's "close embrace strategy" held that the US had to embrace the nation openly in order to allow it to moderate the nation's war conduct behind closed doors.
Beneath this was Biden's decades-long of support for Israel, as well as deep disagreements within his political base over the Gaza War. Every step Biden took endangered dividing his own political backing, whereas Trump's loyal conservative voters provided him more flexibility to act.
In the end, internal considerations or individual ties may have had less importance than the reality that, throughout his term, Israel was not ready to reach an agreement.
Eight months into Trump's second term, with Iran weakened, Hezbollah to its northern border significantly reduced and Gaza devastated, every one of its major strategy objectives had been achieved.
The Israeli missile attack in the Qatari capital, which killed a local national but not the intended targets, prompted Trump to deliver an ultimatum to Netanyahu. The war had to end.
Trump had given the Israeli military a relatively free hand in Gaza. He lent American military might to Israel's campaign in Iran. But an strike on Qatari territory was a different matter completely, moving him towards 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 president to apply maximum pressure to finalize an agreement.
This US president's close ties with the Arab monarchies are widely known. He has commercial interests with Qatar and the United Arab Emirates. The president began each of his administrations with state visits to Saudi Arabia. Recently, Trump also visited in Qatar and the UAE capital.
The president's Abraham Accords, which normalised relations between the Jewish state and a number of Arab nations, such as the UAE, was the most significant foreign policy success 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 a policy institute. The US president did not travel to Israel on this Middle East trip but visited the United Arab Emirates, the kingdom and Qatar where the leader heard consistent appeals to put a stop to the conflict.
Within weeks after that attack on Doha, Trump sat close as the prime minister himself called the Qatari leadership to apologise. Subsequently, the prime minister gave approval on Trump's 20-point peace plan for the territory - one that also had the backing of influential Arab states in the region.
Assuming Trump's alliance with his counterpart provided him the ability to influence the government to reach an agreement, his history with Arab rulers may have ensured their backing, and helped them convince Hamas to commit to the deal.
"A key factor that evidently occurred was that President Trump developed leverage with the Israeli government, and indirectly with the militants," notes an analyst of the Center for Strategic and International Studies.
"This was crucial. The capacity to do this on his own schedule, and avoid yielding to the desires of the warring sides has been a problem that many previous presidents have struggled with, and he appears to do relatively successfully."
The fact that the president is far better liked in the nation than the prime minister himself was leverage that Trump used to his advantage, the expert continues.
Now Israel has committed to releasing over a thousand Palestinians imprisoned in Israeli prisons and has consented to a limited pullback from Gaza.
Hamas will release all the remaining hostages, living and dead, taken during the initial October 7 Hamas attack, which caused the loss of over 1,200 Israelis.
An end to the war, which has led to the destruction of the territory and the fatalities of more than 67,000 {Palestinians|Pal
A tech journalist and AI researcher with over a decade of experience covering digital innovations and emerging technologies.