At first, the Israeli aerial attack on the Hamas negotiating team in Doha seemed like another escalation that drove the prospect of peace further away.
The attack on September 9 breached the sovereignty of an US partner and risked widening the hostilities into a broader regional conflict.
Negotiations seemed to be in ruins.
However, it turned out to be a key moment that has led in a deal, declared by Donald Trump, to free all remaining hostages.
This is a goal that Trump, and Joe Biden before him, had sought for almost 24 months.
This marks just the first step towards a more durable peace, and the details of Hamas disarmament, Gaza governance and complete Israeli pullout 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 Joe Biden and his diplomatic team.
The president's distinct approach and key alliances with the Israeli government and the Arab world seem to have played a role in this breakthrough.
However, as with most foreign policy wins, there were also elements involved beyond the control of both leaders.
Publicly, Donald Trump and Benjamin Netanyahu are all smiles.
The president likes to say that the nation has no greater ally, and Netanyahu has called Trump as the country's "most supportive friend in the White House". Moreover these positive statements have been matched by deeds.
Throughout his initial time in office, the president relocated the US embassy in the country from Tel Aviv to the contested capital and abandoned a long-held US position that Israeli settlements in the occupied territories are illegal, the view under global norms.
When the Israeli military began its air strikes against the Islamic Republic in June, Trump directed American aircraft to strike the Iran's atomic sites with its largest non-nuclear weapons.
Those public demonstrations of backing may have allowed Trump the leeway to exert more influence on the Israeli government behind the scenes. As per sources, Trump's negotiator, his representative, pressured the prime minister in late 2024 into agreeing to a temporary ceasefire in return for the release of a number of captives.
When Israel attacked against Syrian forces in July, even hitting a Christian church, the US president urged his counterpart to alter tactics.
Trump exhibited a level of will and pressure on an Israeli prime minister that is virtually unprecedented, says Aaron David Miller of the Carnegie Endowment for International Peace. "It's unheard of of an US leader literally telling an Israeli leader that you're going to have to comply or else."
Joe Biden's connection with Netanyahu's government was consistently more strained.
The Biden team's "bear hug approach" held that the US had to embrace Israel openly in order to allow it to moderate the country's war conduct in private.
Underneath this was Biden's decades-long of support for the state, as well as deep disagreements within his political base over the conflict in Gaza. Each move Biden took risked fracturing his own domestic support, while his successor's solid Republican base gave him more room to act.
Ultimately, domestic politics or personal relationships may have had less importance than the simple fact that, throughout Biden's presidency, Israel was not ready to reach an agreement.
Eight months into Trump's second term, with the Islamic Republic weakened, Hezbollah to its immediate north significantly reduced and Gaza devastated, every one of its key military goals had been achieved.
The Israeli missile attack in Doha, which resulted in the death of a Qatari citizen but not the intended targets, prompted the president to issue an ultimatum to Netanyahu. The war had to stop.
The US leader had allowed the Israeli military a significant latitude in Gaza. He lent American military might to Israel's campaign in the neighboring country. However an attack on Qatari territory was a separate issue completely, moving him closer to the Arab position on how best to conclude the conflict.
Several Trump officials have told the press that this was a decisive moment which galvanised the leader to apply full force to get a peace deal done.
This US president's close ties with the Gulf states are well documented. Trump has business dealings with the emirate and the United Arab Emirates. The president began both his presidential terms with official trips to Saudi Arabia. Recently, he also visited in Qatar and the UAE capital.
His Abraham Accords, which established ties between Israel and a number of Arab nations, such as the UAE, was the biggest foreign policy success of his first term.
His visits devoted in the capitals of the Arabian Peninsula earlier this year contributed to shift his perspective, according to an expert of the Council on Foreign Relations. Trump 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 bring an end to the conflict.
Less than a month after that Israeli strike on the city, Trump sat close as the prime minister himself called the Qatari leadership to express regret. Subsequently, the prime minister gave approval on the president's comprehensive proposal for Gaza - one that additionally had the support of key Muslim nations in the area.
If Trump's alliance with his counterpart provided him the room to influence the government to strike a deal, his past with Muslim leaders may have ensured their backing, and helped them persuade the group to commit to the arrangement.
"A key factor that evidently occurred was that the US leader developed influence with the Israelis, and indirectly with Hamas," says an analyst of the Center for Strategic and International Studies.
"This was crucial. His ability to do this on his timing, and not succumb to the desires of the warring sides has been a challenge that many previous presidents have struggled with, and he appears to do with some success."
The fact that the president is much more popular in Israel than Netanyahu himself was an advantage that he employed to his benefit, the expert continues.
Now the Israeli government has committed to freeing more than 1,000 detainees imprisoned in Israeli prisons and has consented to a limited pullback from Gaza.
The group will release all the captives still held, living and dead, captured in the original 7 October assault, which caused the death of over 1,200 Israeli citizens.
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 seasoned financial analyst with over a decade of experience in wealth management and investment consulting, passionate about empowering others.