Musharraf, a former special forces commando, became president through the last of a string of military coups that roiled Pakistan since its founding amid the bloody 1947 partition of India. He ruled the nuclear-armed state after his 1999 coup through tensions with India, an atomic proliferation scandal and an Islamic extremist insurgency. He stepped down in 2008 while facing possible impeachment.
Later in life, Musharraf lived in self-imposed exile in Dubai to avoid criminal charges, despite attempting a political comeback in 2012. But it wasn't to be as his poor health plagued his last years. He maintained a soldier's fatalism after avoiding a violent death that always seemed to be stalking him as Islamic militants twice targeted him for assassination.
"I have confronted death and defied it several times in the past because destiny and fate have always smiled on me,'' Musharraf once wrote. "I only pray that I have more than the proverbial nine lives of a cat.''
Musharraf's family announced in June 2022 that he had been hospitalized for weeks in Dubai while suffering from amyloidosis, an incurable condition that sees proteins build up in the body's organs.
"Going through a difficult stage where recovery is not possible and organs are malfunctioning,'' the family said. They later said he also needed access to the drug daratumumab, which is used to treat multiple myeloma. That bone marrow cancer can cause amyloidosis.
Shazia Siraj, a spokeswoman for the Pakistani Consulate in Dubai, confirmed his death and said diplomats were providing support to his family. The Pakistani military also offered its condolences.
"May Allah bless the departed soul and give strength to bereaved family,'' a military statement said.
Pakistani Prime Minister Shahbaz Sharif similarly offered his condolences in a short statement.
"May God give his family the courage to bear this loss,'' Sharif said.
Pakistan, a nation nearly twice the size of California along the Arabian Sea, is now home to 220 million people. But it would be its border with Afghanistan that would soon draw the U.S.'s attention and dominate Musharraf's life a little under two years after he seized power.
Al-Qaida leader Osama bin Laden launched the Sept. 11, 2001, attacks from Afghanistan, sheltered by the country's Taliban rulers. Musharraf knew what would come next.
"America was sure to react violently, like a wounded bear,'' he wrote in his autobiography. "If the perpetrator turned out to be al-Qaida, then that wounded bear would come charging straight toward us.''
By Sept. 12, then-U.S. Secretary of State Colin Powell told Musharraf that Pakistan would either be "with us or against us.'' Musharraf said another American official threatened to bomb Pakistan ''back into the Stone Age'' if it chose the latter.
Musharraf chose the former. A month later, he stood by then-President George W. Bush at the Waldorf Astoria in New York to declare Pakistan's unwavering support to fight with the United States against "terrorism in all its forms wherever it exists.''
Pakistan became a crucial transit point for NATO supplies headed to landlocked Afghanistan. That was the case even though Pakistan's powerful Inter-Services Intelligence agency had backed the Taliban after it swept into power in Afghanistan in 1994. Prior to that, the CIA and others funneled money and arms through the ISI to Islamic fighters battling the 1980s Soviet occupation of Afghanistan.
The U.S.-led invasion of Afghanistan saw Taliban fighters flee over the border back into Pakistan, including bin Laden, whom the U.S. would kill in 2011 at a compound in Abbottabad. They regrouped and the offshoot Pakistani Taliban emerged, beginning a yearslong insurgency in the mountainous border region between Afghanistan and Pakistan.
The CIA began flying armed Predator drones from Pakistan with Musharraf's blessing, using an airstrip built by the founding president of the United Arab Emirates for falconing in Pakistan's Balochistan province. The program helped beat back the militants but saw over 400 strikes in Pakistan alone kill at least 2,366 people _ including 245 civilians, according to the Washington-based New America Foundation think tank.
Though Pakistan under Musharraf launched these operations, the militants still thrived as billions of American dollars flowed into the nation. That led to suspicion that still plagues the U.S. relationship with Pakistan.
"After 9/11, then President Musharraf made a strategic shift to abandon the Taliban and support the U.S. in the war on terror, but neither side believes the other has lived up to expectations flowing from that decision,'' a 2009 U.S. cable from then-Ambassador Anne Patterson published by WikiLeaks said, describing what had become the diplomatic equivalent of a loveless marriage.
"The relationship is one of co-dependency we grudgingly admit _ Pakistan knows the U.S. cannot afford to walk away; the U.S. knows Pakistan cannot survive without our support.''
But it would be Musharraf's life on the line. Militants tried to assassinate him twice in 2003 by targeting his convoy, first with a bomb planted on a bridge and then with car bombs. That second attack saw Musharraf's vehicle lifted into the air by the blast before touching the ground again. It raced to safety on just its rims, Musharraf pulling a Glock pistol in case he needed to fight his way out.
It wasn't until his wife, Sehba, saw the car covered in gore that the scale of the attack dawned on him.
"She is always calm in the face of danger,'' he recounted. But then, "she was screaming uncontrollably, hysterically.''
Born Aug. 11, 1943, in New Delhi, India, Musharraf was the middle son of a diplomat. His family joined millions of other Muslims in fleeing westward when predominantly Hindu India and Islamic Pakistan split during independence from Britain in 1947. The partition saw hundreds of thousands of people killed in riots and fighting.
Musharraf entered the Pakistani army at age 18 and made his career there as Islamabad fought three wars against India. He'd launch his own attempt at seizing territory in the disputed Himalayan region of Kashmir in 1999 just before seizing power from Prime Minister Nawaz Sharif.
Sharif had ordered Musharraf's dismissal as the army chief flew home from a visit to Sri Lanka and denied his plane landing rights in Pakistan, even as it ran low on fuel. On the ground, the army seized control and after he landed Musharraf took charge.
Yet as ruler, Musharraf nearly reached a deal with India on Kashmir, according to U.S. diplomats at the time. He also worked toward a rapprochement with Pakistan's longtime rival.
Another major scandal emerged under his rule when the world discovered that famed Pakistani nuclear scientist A.Q. Khan, long associated with the country's atomic bomb, had been selling centrifuge designs and other secrets to countries including Iran, Libya and North Korea, making tens of millions of dollars. Those designs helped Pyongyang to arm itself with a nuclear weapon, while centrifuges from Khan's designs still spin in Iran amid the collapse of Tehran's nuclear deal with world powers.
Musharraf said he suspected Khan but it wasn't until 2003 when then-CIA director George Tenet showed him detailed plans for a Pakistani centrifuge that the scientist had been selling that he realized the severity of what happened.
Khan would confess on state television in 2004 and Musharraf would pardon him, though he'd be confined to house arrest after that.
"For years, A.Q.'s lavish lifestyle and tales of his wealth, properties, corrupt practices and financial magnanimity at state expense were generally all too well known in Islamabad's social and government circles,'' Musharraf later wrote. "However, these were largely ignored. ... In hindsight that neglect was apparently a serious mistake.''
Musharraf's domestic support eventually eroded. He held flawed elections in late 2002 _ only after changing the constitution to give himself sweeping powers to sack the prime minister and parliament. He then reneged on a promise to stand down as army chief by the end of 2004.
Militant anger toward Musharraf increased in 2007 when he ordered a raid against the Red Mosque in downtown Islamabad. It had become a sanctuary for militants opposed to Pakistan's support of the Afghan war. The weeklong operation killed over 100 people.
The incident severely damaged Musharraf's reputation among everyday citizens and earned him the undying hatred of militants who launched a series of punishing attacks following the raid.
Fearing the judiciary would block his continued rule, Musharraf fired the chief justice of Pakistan's Supreme Court. That triggered mass demonstrations.
Under pressure at home and abroad to restore civilian rule, Musharraf stepped down as army chief. Though he won another five-year presidential term, Musharraf faced a major crisis following former Prime Minister Benazir Bhutto's assassination in December 2007 at a campaign rally as she sought to become prime minister for the third time.
The public suspected Musharraf's hand in the killing, which he denied. A later United Nations report acknowledged the Pakistani Taliban was a main suspect in her slaying but warned that elements of Pakistan's intelligence services may have been involved.
Musharraf resigned as president in August 2008 after ruling coalition officials threatened to have him impeached for imposing emergency rule and firing judges.
"I hope the nation and the people will forgive my mistakes,'' Musharraf, struggling with his emotions, said in an hourlong televised address.
Afterward, he lived abroad in Dubai and London, attempting a political comeback in 2012. But Pakistan instead arrested the former general and put him under house arrest. He faced treason allegations over the Supreme Court debacle and other charges stemming from the Red Mosque raid and Bhutto's assassination.
The image of Musharraf being treated as a criminal suspect shocked Pakistan, where military generals long have been considered above the law. Pakistan allowed him to leave the country on bail to Dubai in 2016 for medical treatment and he remained there after facing a later-overturned death sentence.
But it suggested Pakistan may be ready to turn a corner in its history of military rule.
"Musharraf's resignation is a sad yet familiar story of hubris, this time in a soldier who never became a good politician,'' wrote Patterson, the U.S. ambassador, at the time.
"The good news is that the demonstrated strength of institutions that brought Musharraf down _ the media, free elections and civil society _ also provide some hope for Pakistan's future. It was these institutions that ironically became much stronger under his government.''