The doors of jihad opened for Ayman al-Zawahiri as a young doctor in a Cairo clinic, when a visitor arrived with a tempting offer: a chance to treat Islamic fighters battling Soviet forces in Afghanistan.
Hold tight - we’re checking permissions before loading more content
With that offer in 1980, Zawahiri embarked on a life that over three decades took him to the top of the most feared terrorist group in the world, al-Qaeda, after the death of Osama bin Laden.
Already an experienced militant who had sought the overthrow of Egypt's "infidel" regime since age 15, Zawahiri spent just a few weeks in the Afghan war zone, but it opened his eyes to new possibilities.
What he saw was "the training course preparing Muslim mujahideen youth to launch their upcoming battle with the great power that would rule the world: America", he wrote in 2001.
Zawahiri, 71, was killed at the weekend by a US drone strike in Afghanistan. President Joe Biden announced the death on Monday.
Zawahiri was crucial in turning the jihadi movement to target the United States as the right-hand man to bin Laden, the young Saudi millionaire he met in the Afghanistan-Pakistan region. Under their leadership, al-Qaeda carried out the deadliest attack ever on American soil, the September 11, 2001, suicide hijackings.
The attacks on the World Trade Center and Pentagon made bin Laden America's No.1 enemy, but he likely could not have carried it out without his deputy.
While bin Laden came from a privileged background in a prominent Saudi family, Zawahiri had the experience of an underground revolutionary. Bin Laden provided al-Qaeda with charisma and money, but Zawahiri brought tactics and organisational skills needed to forge militants into a network of cells around the world.
When the 2001 US invasion of Afghanistan demolished al-Qaeda's safe haven, Zawahiri ensured al-Qaeda's survival. He rebuilt its leadership in the Afghan-Pakistan border region and installed allies as lieutenants in key positions.
He also became the movement's public face, putting out a stream of video messages while bin Laden largely hid.
With his thick beard, heavy-rimmed glasses and a bruise on his forehead from prostration in prayer, he was notoriously prickly and pedantic. He picked ideological fights with jihadi critics, and even some of al-Qaeda's leadership were put off, calling him overly controlling, secretive and divisive.
Yet he reshaped the organisation from a centralised planner of terrorist attacks into the head of a franchise. Autonomous branches were created around the region, including in Iraq, Saudi Arabia, Yemen, North Africa, Somalia and Asia.
After 9/11, al-Qaeda inspired or had a direct hand in attacks in those areas as well as Europe, Pakistan and Turkey, including the 2004 train bombings in Madrid and the 2005 transit bombings in London. More recently, the al-Qaeda affiliate in Yemen proved itself capable of plotting attacks on US soil with an attempted 2009 bombing of an American passenger jet and an attempted package bomb the following year.
After Bin Laden was killed in a US raid in 2011 on his compound in Abbottabad, Pakistan, al-Qaeda proclaimed Zawahiri its paramount leader.
The 2011 Arab Spring uprisings around the Mideast threatened a major blow to al-Qaeda, showing that jihad was not the only way to get rid of Arab autocrats. It was mainly pro-democracy activists who toppled Egypt's president Hosni Mubarak, the longtime goal Zawahiri failed to achieve.
But Zawahiri sought to co-opt the uprisings, insisting they would have been impossible if the 9/11 attacks had not weakened America. And he urged Islamic hardliners to take over where leaders had fallen.
Zawahiri was born June 19, 1951, the son of an upper-middle-class family of doctors and scholars in the Cairo suburb of Maadi.
From an early age, he was enflamed by the radical writings of Sayed Qutb, the Egyptian Islamist who taught that Arab regimes were "infidel" and should be replaced by Islamic rule.
In the 1970s, as he earned his medical degree as a surgeon, he was active in militant circles. He merged his own militant cell with others to form the group Islamic Jihad and began trying to infiltrate the military.
Then came the 1981 assassination of Egyptian president Anwar Sadat by Islamic Jihad militants. Zawahiri wrote that he learned of the plot only hours before the assassination, but he was arrested along with hundreds of other militants and served three years in prison.
After his release in 1984, Zawahiri returned to Afghanistan and joined Arab militants fighting alongside the Afghans against the Soviets. He courted bin Laden, who became a heroic figure for his financial support of the mujahideen.
Zawahiri followed bin Laden to his new base in Sudan, and from there he led Islamic Jihad in a campaign of bombings aimed at toppling Egypt's US-allied government.
That movement failed, but Zawahiri would bring to al-Qaeda the tactics that he honed in Islamic Jihad.
He promoted the use of suicide bombings to become al-Qaeda's hallmark. He plotted a 1995 suicide car bombing of Egypt's embassy in Islamabad that killed 16 people, presaging the more devastating 1998 al-Qaeda bombings of the US embassies in Kenya and Tanzania that killed more than 200, attacks Zawahiri was indicted for in the United States.
In 1996, Sudan expelled bin Laden, and he and his fighters found a safe haven under the radical Taliban regime. Once more, Zawahiri followed.
Australian Associated Press