At first, the Israeli aerial attack on the Hamas militant negotiating team in Qatar seemed like yet another escalation that pushed the prospect of peace out of reach.
This strike on September 9 violated the territorial integrity of an US partner and risked widening the hostilities into a region-wide war.
Diplomacy seemed to be in ruins.
However, it proved to be a key moment that has led in a deal, announced by President Donald Trump, to release all remaining hostages.
This is a objective that he, and Joe Biden before him, had sought for nearly two years.
It is just the first step towards a lasting resolution, and the specifics of disarming Hamas, Gaza governance and complete Israeli pullout are still to be worked out.
Yet if this agreement holds, it could be Trump's signature achievement of his return to office - one that escaped Biden and his administration.
Trump's distinct approach and crucial relationships with the Israeli government and the Arab world seem to have played a role in this breakthrough.
However, as with many diplomatic achievements, there were also factors involved beyond the control of either man.
In public, Donald Trump and Benjamin Netanyahu are all smiles.
The president often states that Israel has no better friend, and the Israeli leader has described him as Israel's "greatest ever ally in the US presidency". Moreover these positive statements have been matched by deeds.
During his first presidential term, the president relocated the American diplomatic mission in Israel from Tel Aviv to the contested capital and abandoned 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 the Islamic Republic in June, Trump directed US bombers to strike the nation's atomic sites with its most powerful conventional bombs.
These visible shows of backing may have allowed the president the room to exert more pressure on Israel behind the scenes. As per sources, the president's envoy, Steve Witkoff, pressured Netanyahu in late 2024 into accepting a halt in fighting in exchange for the freeing of some hostages.
After Israel attacked against Syrian forces in July, even bombing a place of worship, the US president pressured his counterpart to change course.
The leader displayed a degree of will and pressure on an Israel's leader that is rarely seen, says Aaron David Miller of the Carnegie Endowment for International Peace. "There is no example of an US leader literally telling an Israeli prime minister that they must agree or else."
Joe Biden's connection with Netanyahu's government was always more tenuous.
His administration's "close embrace approach" held that the US had to embrace Israel openly in order to enable it to influence the country's war conduct in private.
Beneath this was Biden's decades-long of backing for the state, as well as sharp divisions within his political base over the conflict in Gaza. Every step Biden took endangered fracturing his own political backing, whereas his successor's solid Republican base gave him more flexibility to act.
In the end, domestic politics or personal relationships may have had little impact than the simple fact that, during Biden's presidency, the Israeli government was not ready to reach an agreement.
Several months into Trump's second term, with Iran weakened, Hezbollah to its northern border greatly diminished and the coastal strip devastated, all its major strategy objectives had been accomplished.
The Israeli missile attack in the Qatari capital, which resulted in the death of a local national but no Hamas officials, prompted the president to deliver an ultimatum to the prime minister. The war had to stop.
The US leader had given Israel a relatively free hand in the territory. The president provided US armed support to Israeli operations in the neighboring country. However an attack on Qatari territory was a separate issue entirely, moving him towards the Arab position on how best to conclude the conflict.
A number of administration figures have told media outlets that this was a decisive moment which motivated the leader to apply full force to get a peace deal done.
The leader's close ties with the Gulf states are well documented. Trump has commercial interests with Qatar and the UAE. The president began both his presidential terms with official trips to Saudi Arabia. This year, he also stopped in Doha and the UAE capital.
His normalization agreements, which normalised relations between the Jewish state and a number of Arab nations, such as the Emirates, was the most significant diplomatic achievement of his initial presidency.
The time devoted in the capitals of the Gulf region in recent months contributed to change his thinking, says an expert of the Council on Foreign Relations. Trump did not travel to Israel on this regional tour but went to the UAE, the kingdom and Qatar where the leader heard consistent appeals to bring an end to the war.
Within weeks after that Israeli strike on the city, the president was present nearby as the prime minister personally 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 support of key Muslim nations in the area.
Assuming the president's alliance with his counterpart provided him the room to influence Israel to strike a deal, his past with Muslim leaders may have secured their backing, and helped them persuade Hamas to commit to the deal.
"One of the things that clearly happened was that President Trump gained leverage with the Israelis, and indirectly with Hamas," says an analyst of the Center for Strategic and International Studies.
"That made a difference. His ability to do this on his timing, and avoid yielding to the desires of the combatants has been a problem that many previous presidents have struggled with, and Trump appears to handle relatively successfully."
The fact that the president is far better liked in Israel than the prime minister personally was an advantage that Trump employed to his benefit, he adds.
Currently Israel has agreed to releasing more than 1,000 Palestinians imprisoned in Israeli prisons and has agreed to a partial withdrawal from Gaza.
Hamas will release all the captives still held, both alive and deceased, captured in the initial October 7 assault, which caused the death of more than 1,200 Israeli citizens.
An end to the war, which has resulted in the devastation of Gaza and the fatalities of over 67,000 {Palestinians|Pal
Maya Chen is an urban planner and writer with over a decade of experience in sustainable city development and community engagement.