Despite a $25 million US bounty on his head, Al Qaeda leader Ayman Al Zawahiri apparently felt comfortable enough with the Taliban's takeover of Afghanistan to move into a home in Kabul where he would regularly appear out in the open, on his balcony.
But the US government had not given up its pursuit of one of the planners of the September 11, 2001 attacks and the heir to Osama bin Laden.
Al Zawahiri had been in hiding, rumoured to be in Pakistan’s tribal areas or in remote areas of Afghanistan, but the operation to locate and kill him was the result of “careful patient and persistent” work by the counter-terrorism and intelligence community, a senior administration official told reporters.
Washington had been aware of a network that it determined was supporting Al Zawahiri but following the US withdrawal from Afghanistan, officials were watching for indications of Al Qaeda's presence in the country.
This year, officials determined that Al Zawahiri's family — his wife, his daughter and her children — had relocated to a safe house in Kabul and subsequently identified Al Zawahiri at the same location.
They were careful, the official said, exercising “long-standing terrorist tradecraft” to prevent anyone tracking them from finding the Qaeda leader.
The US intelligence agents then watched the house for several months, growing more confident that they had correctly identified Al Zawahiri. In early April, they briefed senior administration officials. National Security Adviser Jake Sullivan then briefed President Joe Biden.
“We were able to build a pattern of life through multiple independent sources of information to inform the operation,” the official said.
Once Al Zawahiri arrived at the Kabul safe house, officials were not aware of him leaving but they identified him on the balcony — where he was ultimately struck — on numerous occasions for “sustained periods of time”, the official said.
But the planners behind the operation studied the house and scrutinised its occupants in a bid to ensure they could carry out the precision strike on Al Zawahiri without damaging the structural integrity of the building and risking civilians or the lives of the terror leader’s family.
Defence and intelligence officials finalised the plan in June and presented it to Mr Biden in the White House situation room on July 1, using a detailed model of the residence, as was done before the bin Laden raid.
Mr Biden “asked detailed questions about what we knew and how we knew it” and closely examined a model of the safe house the intelligence community had built and brought to the meeting.
He asked about lighting, weather, construction materials and other factors that could affect the success of the operation, the official said. The president also requested an analysis of the potential ramifications of a strike in Kabul.
A tight circle of senior inter-agency lawyers examined the intelligence reporting and confirmed that Al Zawahiri was a lawful target based on his continuing leadership of Al Qaeda.
On July 25, the president convened his key Cabinet members and advisers to receive a final briefing and discuss how killing Al Zawahiri would affect America's relationship with the Taliban, among other issues, the official said.
After soliciting views from others in the room, Mr Biden authorised “a precisely tailored air strike” on the condition that it minimises the risk of civilian casualties.
The meeting echoed the April 28, 2011, White House meeting where Barack Obama, US president at the time, decided to send US special operations troops into Pakistan to get bin Laden.
At that time Mr Biden was vice president and he expressed doubts. The risks of things going wrong were high, bin Laden had not been clearly identified and relations with Pakistan could suffer, he later recalled.
With Al Zawahiri, however, no US troops would enter the country; Zawahiri was clearly identified, and relations with the Taliban were virtually non-existent.
On Sunday morning, at 6.18am, a US drone armed with two precision-guided Hellfire missiles killed the leader of Al Qaeda on his balcony.
But the missiles appear to be modified versions of the Hellfire, whose high explosives could have destroyed the whole house.
Photographs of the building shows only a few windows on one floor blown out, and the rest intact.
Although the US hasn’t confirmed it yet, this points to the likely use of a non-explosive version of the Hellfire, the R9X, which deploys a series of knife-like blades from its fuselage and shreds its target but leaves nearby people and objects intact.
The so-called “flying ginsu” missile has been used half a dozen or more times by US forces to kill other militant group leaders without hurting bystanders.
The official did not provide details but expressed strong confidence that Zawahiri had been killed and no others were hurt.
“Zawahiri's family members were present in other parts of the safe house at the time of the strike and were purposely not targeted and were not harmed,” he said.
The official said the strike “deals a significant blow to Al Qaeda and will degrade the group's ability to operate”.
“As President Biden has consistently said, we will not allow Afghanistan to become a safe haven for terrorists who might bring harm to Americans,” the official said.