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.
After years of tracking him down, US armed forces fired two Hellfire missiles from a drone flying above the Afghan capital, striking Zawahiri's safe house and killing him, President Joe Biden announced on Monday.
US officials described an operation as meticulously planned as that which killed bin Laden in his Pakistan hideout in 2011.
That the leader of the violent jihadist group was in Afghanistan was not surprising: since the hard-line Islamist Taliban regained control in August, Al-Qaeda has felt more at home, analysts say.
But finding him was still hard.
"For several years the US government has been aware of a network that we assessed supported Zawahiri," a senior administration official told reporters.
But it was only this year that US intelligence learned that his family, his wife, his daughter and her children, had moved to the Afghan capital.
They were careful, the official said, exercising "longstanding terrorist tradecraft" to prevent anyone from tracking them to the Qaeda leader. Still, eventually Zawahiri showed up, and never left.
"We identified Zawahiri on multiple occasions for sustained periods of time on the balcony," the official said.
An attack plan was developed over May and June. The United States constantly monitored the multi-story residence -- just how the official would not say -- to understand the family's pattern of life.
ALSO READ | Zawahiri death: Did US use secret 'flying ginsu' missile?
Detailed safe-house model
They studied the construction of the home, aiming to hit Zawahiri without threatening the building's structural integrity, to minimize the risk to civilians.
Defence and intelligence officials finalized the plan in June and presented it to Biden in the White House on July 1, using a detailed model of the residence, as was done before the bin Laden raid.
Biden asked detailed questions on the structure, weather issues, and the risk to civilians, the official said.
Finally, on July 25, Biden -- still ill with a bout of Covid-19 -- made the decision.
It took place with key cabinet officials joining the final briefing, echoing the April 28, 2011 White House meeting where President Barack Obama decided to deploy US special operations troops to enter Pakistan and get Bin Laden.
WATCH |