In the nine years that he led Pakistan, Gen. Pervez Musharraf sometimes called himself a тАЬtightrope walkerтАЭ тАФ someone who could balance opposing forces, or straddle PakistanтАЩs dizzying political and ideological divides.
Contradictions abounded. Mr. Musharraf was the darling of the West who played footsie with the Taliban; he was the whiskey-swilling liberal who made concessions to extremists; or the swaggering army commando who tried to make peace with India.
But the tragedy for Mr. Musharraf, who died in Dubai on Sunday at the age of 79, is that he is now mostly seen as the leader who couldnтАЩt keep his footing and ultimately fell off the tightrope: the last military general who overtly held power in Pakistan.
As plans were being made on Monday to fly Mr. MusharrafтАЩs remains home from exile тАФ a journey he could not make in life тАФ historians and others in Pakistan began to grapple with his conflicted legacy as a central figure in the post-Sept. 11 world who ultimately lost his grasp on any Pakistani constituency.
тАЬTodayтАЩs Pakistan is the product of Musharraf,тАЭ said Adil Najam, a professor of international affairs at Boston University. тАЬThe forces that shape the country today were unleashed during his time in power. But I donтАЩt think he intended it that way.тАЭ
ItтАЩs been over four decades since Pakistanis mourned a leader who died in bed. The last two funerals were for former Prime Minister Benazir Bhutto, who was assassinated in 2007; and the military dictator Gen. Muhammad Zia ul-Haq, who died┬аin a mysterious plane crash in 1988 тАФ both unforgettable emblems of the countryтАЩs perilous politics.
Even so, there has been little hesitation to pass judgment on Mr. Musharraf in recent days. Some squarely blame him for the precarious state of the country тАФ a nuclear-armed nation of 220 million with tottering institutions, fractious politics, a crumbling economy and empowered religious extremism. тАЬMuch of the ills of today can be traced back to the Musharraf era,тАЭ Cyril Almeida, a political commentator, wrote on Twitter.
His legacy is most uncomfortable for the military he once led.
Since his ouster in 2008, the army had sought to shield Mr. Musharraf from the full wrath of PakistanтАЩs justice system. As angry Pakistanis pursued him through the courts with accusations of abuses during his time in power, including murder and treason, he never spent a night in jail. That was largely because the military made sure he was allowed to slip into exile several times, most recently in 2016.
Yet the army has also seemed happy have Mr. Musharraf fade into obscurity in Dubai. Many within the countryтАЩs security sector blame him for troubles that battered the armyтАЩs reputation and, ultimately, caused the military leadership to radically change the way they exert power in Pakistan.
Some point to his alliance with the United States and President George W. Bush after the Al Qaeda terrorist attacks of 2001 that brought in billions of dollars in military aid, but also triggered a┬аmilitant uprising within Pakistan that led to vicious fighting, suicide bombings and tens of thousands of deaths.
Others were resentful of the cooperation that Mr. Musharraf gave the Americans, allowing the C.I.A. to set up a secret drone base for several years тАФ only to be humiliated, in 2011, when a Navy SEAL team swooped into a house in Abbottabad and killed the founder of Al Qaeda, Osama bin Laden, barely a few hundred yards from a major Pakistani military base.
Still others have condemned what they see as MusharrafтАЩs тАЬdouble gameтАЭ тАФ with his intelligence services hunting some militants to earn American favor and money, while they quietly coddled others who were deemed to serve PakistanтАЩs strategic┬аinterests in Afghanistan or Kashmir. ┬а┬а
Harsh public criticism of the military became louder and more frequent, altering a relationship with a Pakistani public that had previously been characterized by deference тАФ or at least silence.
тАЬThe military in Pakistan has gone through a major change in the past two decades,тАЭ Mr. Najam said. тАЬIt has gone from being an institution that most people respected, or kept quiet about, to one that is now very publicly under attack тАФ and that shift started with Pervez Musharraf.тАЭ
That era changed the calculus of power for the Pakistani military, which has dominated the country one way or another since the countryтАЩs independence in 1947. No longer bent on seizing power directly after MusharrafтАЩs tenure, it allows civilians to be elected in democratic polls, while retaining a hold on the levers that count: control of PakistanтАЩs nuclear weapons; steering the countryтАЩs policy toward Afghanistan and India; and directing the relationship with America and, increasingly, China.
It is not, probably, the country that Mr. Musharraf hoped to forge after he seized power in a bloodless coup in 1999. He portrayed himself as a swashbuckling modernizer who was determined to steer Pakistan away from the dour Islamism of its previous military ruler, General Zia.
He sat in the front row at fashion shows, let it be known that he enjoyed a glass of whiskey, and was photographed clutching his two Pekingese poodles, which infuriated conservatives who consider dogs to be dirty.
He published a memoir while still in office in which he compared himself to Napoleon and boasted about his muscles and the number of times he had cheated death.┬аHe appeared on the Jon StewartтАЩs тАЬThe Daily Show,тАЭ where he ate Twinkies, made jokes about Mr. bin Laden and called himself a тАЬtightrope walker.тАЭ
For a time, the West lapped it up. The United States lavished billions in aid on Pakistan. In return, Mr. Musharraf handed over for detention at the AmericansтАЩ Guant├бnamo Bay hundreds of suspected Qaeda members тАФ some of whom turned out to be innocent.
But it soon became clear that Mr. Musharraf couldnтАЩt keep his promises, and frustrations began to build. Schisms emerged inside his own military about how to counter Islamist extremism. There were disagreements about how to fight the Pakistani Taliban, or whether to cut army support to militant groups like Lashkar-e-Taiba, which in 2008 carried out terrorist attacks in Mumbai that killed 175 people.
Massive street protests rose against Mr. Musharraf, and he was forced to resign in 2008.
The effects of that era continue to reverberate.
The insurgency in Baluchistan that ignited under Mr. Musharraf rumbles on. The countryтАЩs security establishment seemingly remains ambivalent about how to deal with jihadist groups. The legacy of empowered Islamic extremists is still causing chaos on PakistanтАЩs streets, whether in the form of giant protests or lynch mobs that kill accused blasphemers with impunity.┬аJust last weekend, the Pakistani authorities banned the website Wikipedia, claiming it contained blasphemous material.
The dysfunctional relationship between civilian and military leaders has taken a new twist. Imran Khan, the cricket legend turned politician, came to power in 2018 with the lightly disguised support of the military, which saw him as a biddable ally.
But after Mr. Khan was ousted in a no-confidence vote last year, he directed his supportersтАЩ anger against foes inside the military whom he blamed for his downfall. Since then, he has devoted his energies to a public excoriation of senior military figures that would have once been unthinkable.
тАЬImran Khan came to power touting that he was on the same page as the military,тАЭ said Madiha Afzal, a Pakistan expert at the Brookings Institution. тАЬAnd he has ended on a stunning anti-establishment note in a way that no Pakistani politician has done before.тАЭ
Still, she added, it would be unfair to blame Mr. Musharraf for all of PakistanтАЩs problems, or even for the militaryтАЩs continued hold on power. Those, she said, are rooted in pathologies that go back to the countryтАЩs split with India in 1947.
тАЬIt traces back to two pillars тАФ reliance on Islam and opposition to India тАФ that all of the countryтАЩs leaders have tried to follow,тАЭ she said.┬атАЬMusharraf wasnтАЩt responsible for that тАФ he was a product of it.тАЭ
Salman Masood contributed reporting from Islamabad, Pakistan.