Israeli troops had for more than a year hunted the leader of Hamas, who disappeared in Gaza soon after masterminding the 7 October attacks.
Yahya Sinwar, 61, was said to have spent much of his time hiding in the tunnels under the Strip, along with a cadre of bodyguards and a "human shield" of hostages seized from Israel.
But ultimately, it appears he met his end in a chance encounter with an Israeli patrol in southern Gaza. His guard detail was small. No hostages were found.
Details are still emerging, but here's what we know so far about Sinwar's killing.
Israeli military commanders visiting the scene where Sinwar was killed
The Israel Defense Forces says a unit from its 828th Bislamach Brigade was patrolling Tal al-Sultan, an area of Rafah, on Wednesday.
Three fighters were identified and engaged by the Israeli troops - and all were eliminated.
At that stage nothing seemed particularly remarkable about the firefight and the soldiers did not return to the scene until Thursday morning.
It was then, as the dead were inspected, that one of the bodies was found to bear a striking resemblance to the leader of Hamas.
The corpse however remained at the site due to suspected booby traps and instead, part of a finger was removed and sent to Israel for testing.
His body was finally extracted and brought to Israel later that day as the area was made safe.
Daniel Hagari, the IDF's spokesman, said his forces "didn't know he was there but we continued to operate".
He said his troops had identified the three men running from house to house, and engaged them before they split up.
The man since identified as Sinwar "ran alone into one of the buildings". After being located by a drone, he was killed when a tank launched a shell at the building.
Sinwar's body was found with a flak jacket, a gun and 40,000 shekels (£8,240).
None of the hostages Sinwar was believed to be using as a human shield were present and his small retinue suggests either he was trying to move unnoticed, or had lost many of those protecting him.
Hagari also said the IDF had gained an indication of Sinwar's previous movements when they found his DNA in a tunnel close to where the bodies of six hostages were recovered around six weeks ago.
Israel is now searching for Sinwar's brother, Muhammad Sinwar, and all Hamas military commanders, Hagari said.
Yoav Gallant, Israel's defence minister, said: "Sinwar died while beaten, persecuted and on the run – he didn't die as a commander, but as someone who only cared for himself. This is a clear message to all of our enemies."
Drone footage released by the Israeli military late on Thursday was said to show Sinwar's final moments before he was killed.
The video appears to be shot from a drone flying through the open window of a mostly destroyed building.
It approaches a man, with his head covered, sitting in an armchair on the first floor of a house that is littered with debris.
The man, who seems to be injured, then throws what appears to be a stick at the drone and the video ends.
IDF drone footage 'shows Sinwar in final moments'
Israel first announced it was "investigating the possibility" that Sinwar had been killed in Gaza on Thursday afternoon local time.
Within minutes of the announcement, pictures posted to social media showed the body of a man with very similar features to the Hamas leader, who had suffered catastrophic head wounds. The images are too graphic to republish.
However, officials warned "at this stage" the identity of any of the three men killed could not be confirmed.
Not long after that, Israeli sources told the BBC leaders were "increasingly confident" they had killed him. However, they said all necessary tests must be carried out before the death could be confirmed.
Those tests did not take long. By Thursday evening, Israel had announced they had been completed and that Sinwar was confirmed "eliminated".
Benjamin Netanyahu, the Israeli prime minister, said "evil" had been "dealt a blow", but warned the Israeli war in Gaza had not been completed.
Israeli troops patrol through the streets of a rubble-strewn Rafah in September 2024
While Sinwar was not killed during a targeted operation, the IDF said that it had for weeks been operating in areas where intelligence indicated his presence.
In short, Israeli forces had narrowed Sinwar's rough location to the southern city of Rafah, and were slowly moving in to get him.
Sinwar had been on the run for more than a year. He had undoubtedly felt the Israeli pressure growing as other Hamas leaders, such as Mohammad Dief and Ismail Haniyeh, were killed, and as Israel destroyed the infrastructure he had used to prosecute the atrocities of 7 October.
In a statement, the IDF said its operations in recent weeks in the south had "restricted Yahya Sinwar's operational movement as he was pursued by the forces and led to his elimination".
Cars in Tel Aviv drive past a poster of Sinwar, with a message in Hebrew urging Israelis to unite against their most wanted enemy
Killing Sinwar was a major goal for Israel, which marked him for death soon after the 7 October attacks. But his end does not end the war in Gaza.
On Friday, a member of Hamas’s political bureau, Basem Naim, said in a statement that it seems “Israel believes that killing our leaders means the end of our movement and the struggle of the Palestinian people”, but said Hamas as a movement could not be eliminated.
Naim did not directly name Sinwar or confirm his death, but said “it is very painful and distressing to lose beloved people”.
While Netanyahu said he had "settled the score", he insisted the war would continue - not least to save the 101 hostages still held by Hamas.
"To the dear hostage families, I say: this is an important moment in the war. We will continue full force until all your loved ones, our loved ones, are home."
In Israel, families of hostages said they hoped a ceasefire could now be reached that would bring home the captives.