This article originally appeared in Foreign Policy.

The evening was temperate. The skies were clear. And the general's eyes began to fill with mist. On April 30, 2011, Gen. Ashfaq Parvez Kayani, now the outgoing head of the Pakistani Army, struggled to hold back his tears as he stood before the Yadgar-e-Shuhada, a memorial dedicated to Pakistani soldiers slain in the line of duty, at the Army's General Headquarters in Rawalpindi.

Kayani's hands quivered as he saluted Pakistan's fallen warriors. He blinked nervously, pressed his lips tight, and swallowed back tears. It was a rare display of emotion by this normally stoic career soldier, a man often described as having an inscrutable "poker face."

That evening marked the nation's second annual Martyrs' Day -- a commemoration inaugurated by Kayani not so much to remind Pakistanis of the sacrifices made in three wars with India but to mobilize national support for an enduring war within. It has been a decade-long war of Pakistani against Pakistani, Muslim against Muslim, and Islam against Islam. Perhaps more than anything, it has also been Ashfaq Kayani's war.

Kayani, who issued a public statement on Oct. 6 confirming his retirement, has commanded the Army in its fight against the Pakistani Taliban for the last six years. His influence was so wide-ranging that Adm. Mike Mullen, while chairman of the U.S. Joint Chiefs of Staff, met with him more than two dozen times. Soon, however, he will enter private life. And barring a post-retirement appointment to a civilian post, such as national security advisor, he will retain little, if any, influence over policymaking.

In 2007, Kayani inherited a fighting force that, under his predecessor, Gen. Pervez Musharraf, struggled to counter the jihadi threat in the country's lawless tribal areas and adjoining territories in the years following the 9/11 attacks. Battles between the Army and jihadists often resulted in stalemates, followed by peace deals that militants used to strengthen and spread. The security forces, particularly the paramilitary Frontier Corps, were plagued by significant rates of desertions in the tribal areas, mainly by soldiers who opposed fighting other Muslims. Some communities, in accordance with a fatwa by radical cleric Abdul Rashid Ghazi, would refuse to participate in the funeral rites of soldiers whose bodies had been brought back home, believing that the war they had died in was illegitimate and designed to further U.S. interests.

Not only was the Army that Musharraf handed over to Kayani demoralized and fatigued in battle, but it was also overleveraged in politics and business. During his tenure, Kayani distanced the Army from politics. He declared 2008 the "Year of the Soldier" and pledged to improve the living conditions of low-level and noncommissioned officers, men who could not count on the kind of kickbacks and lucrative noncombat appointments enjoyed by senior officers.

At the same time that he was depoliticizing the Army, however, the chain-smoking general was working feverishly behind the scenes to cultivate the support of the elected civilian government and key opinion shapers in the media, particularly nationalists, for a decisive confrontation with the Pakistani Taliban. By 2009, Pakistan was facing its most significant threat in decades: The Taliban had overrun the Swat region in the country's north and had advanced to within 60 miles of the capital, Islamabad. In May of that year, Kayani launched the defining counterinsurgency operation of his tenure, driving the Taliban back into the tribal areas and allowing most of the million-plus Pakistanis who had been displaced to return to their homes within three months

Keen to bolster troop morale and public support, Kayani made regular visits to the front lines in Swat, as well as to some of the six other tribal areas where he had ordered military operations. He also made a regular practice of spending the Eid holidays with deployed military personnel in Swat and South Waziristan -- a clear contrast to many of the civilian government officials who were effectively absent as the country burned.

2010 marked the apex of Kayani's domestic popularity, with his having notched a decisive victory in Swat, and 2011, the beginning of his descent. That year began with the killing of two Pakistanis by a CIA security contractor and ended with an errant U.S. attack on a Pakistani border post that killed two dozen soldiers. Sandwiched in between was Kayani's greatest failing in the court of public opinion -- the Osama bin Laden raid -- not so much because of the Army's failure to find the al Qaeda leader, but from the humiliation of the unilateral U.S. military operation on Pakistani soil.

The general faced harsh criticism from young army officers and the political class, with cricket star turned politician Imran Khan calling for him to resign. The cautious Kayani helped end these crises by compromising with the United States, likely taking a page out of his graduate thesis on the Afghan mujahideen's war against the Soviet Union, a work in which he argued that Pakistan must carefully calibrate its support for the Afghans so as to avert a direct war with a superpower. Still, the army chief managed to never quite give the Americans what they wanted -- decisive action against the Haqqani network based in Pakistan's tribal areas -- literally blowing smoke in the face of senior U.S. officials and maintaining his characteristic silence as they implicitly threatened a repeat of the bin Laden raid.

Now, two years later, Kayani exits the scene against the backdrop of a historic election and with his reputation -- as indicated by plaudits in the Pakistani press -- rehabilitated to some degree. But the war goes on. As an insurgent force, the Pakistani Taliban's strength has been significantly reduced, but it still controls key segments of the tribal areas and remains an enduring terrorist threat. Last year, more terrorist attacks took place in Pakistan than in any other country. The Pakistani Taliban has adapted -- growing in urban areas like Karachi, Pakistan's largest city and commercial hub -- and its partner, the Lashkar-e-Jhangvi terrorist group, has stepped up attacks against Shiite Muslims across the country.

Kayani's successor will have to work under a civilian government, led by Prime Minister Nawaz Sharif, that lacks the will to fight against the Pakistani Taliban. Sharif has repeatedly called for talks with the terrorist organization, which has pledged to continue its bloody campaign against the state until Islamabad ceases its cooperation with Washington in the war on terror and implements a warped version of Islamic law.

Having clashed with four army chiefs during his two previous stints in office -- and having been overthrown by one of them in 1999 -- Sharif will likely appoint a general who is not only competent, but likely to stay within his constitutional boundaries. But if Sharif chooses deference over competence, he might rule out generals who are best equipped to keep the Pakistani Taliban at bay and defuse future political crises, should they arise.

Among the five front-runners to replace Kayani, at least two are highly determined to continue the fight against the Pakistani Taliban and would likely resist Sharif's push for talks. Lt. Gen. Haroon Aslam, currently the senior-most general among likely Kayani replacements, is a former commando who led Pakistani special forces into the terrorist-infested Peochar Valley in Swat in 2009. He has publicly pledged to defeat the Pakistani Taliban, saying months after the raid, "We will wipe you out. You are Pakistan's enemies and we love Pakistan."

It would be similarly difficult to imagine dark-horse candidate Lt. Gen. Tariq Khan -- who reformed the fledgling paramilitary Frontier Corps that operates in the tribal areas -- endorsing Sharif's push for talks with the Pakistani Taliban. Khan is also known to be outspoken during meetings of the Army's corps commanders and has reportedly criticized Kayani's restraint toward the civilian government.

Rounding out the list of lieutenant generals whom Sharif could choose to replace Kayani are Rashad Mahmood, Zaheer ul-Islam, and Raheel Sharif. The latter is possibly the safest choice politically for Nawaz Sharif, as Raheel Sharif enjoys a close relationship with one of the prime minister's confidants. But it's unclear whether he or any of the other potential army chiefs will truly be able to fill Kayani's shoes, especially when it comes to crisis management. Historically, the army chief of staff has played an important role in maintaining stability. For example, in 2009 when tens of thousands of protesters led by Nawaz Sharif marched on the capital to pressure President Asif Ali Zardari to restore the deposed chief justice, Kayani quietly intervened when the time was right, meeting with Zardari and helping finesse the chief justice back into his post. Two free and fair elections also took place during Kayani's tenure -- unprecedented for any Pakistani army chief.

The next army chief will have his work cut out for him. In addition to convincing the reluctant civilian government to continue the fight against the Pakistani Taliban, he will have to help manage the Afghanistan endgame as U.S. troops withdraw and a presidential election take place next year. Pakistan desperately needs the Afghan government to forge a political settlement with its own Taliban -- thereby morally weakening the Pakistani-based insurgency. But Pakistan's civilian government, which has been slow to develop a counterterrorism policy and has balked at major diplomatic appointments, lacks the machinery to handle all the moving pieces. The next army chief, like Kayani, must be able to offer the government strategic direction in pursuit of a grand bargain in Afghanistan.

In addition to completing Kayani's war, the next army chief will have to fundamentally change the way Pakistan's security services operate inside the country -- so as to avoid sowing the seeds of their own destruction. The military will have to wean itself off its dependence on jihadi proxies, as these forces have all too often grown out of control and pursued their own agendas. Many of the militant camps that the military created inside Pakistan to train forces to fight in Afghanistan and India now produce militants who want to overthrow the government in Islamabad. The military and intelligence services must also end their practice of extrajudicial killings and torture -- for example in Baluchistan, where the military has a robust targeted-killing campaign -- which only serve to harden the militants' resolve and increase the moral ambiguity between the government and the terrorists.

In his retirement message, Kayani said, "It is time for others to carry forward the mission of making Pakistan a truly democratic, prosperous and peaceful country that embodies the finest dreams our founding fathers had envisaged for us." For these dreams to become reality -- and for the war against the Pakistani Taliban and other insurgents to be won -- Pakistan's Army must move along the path of reform and abide by civil, democratic norms. Pakistan will see peace when all elements of its state work to defend the rights and lives of its citizenry -- including dissidents. In this, the Army cannot be exempt.


The Middle East Institute (MEI) is an independent, non-partisan, non-for-profit, educational organization. It does not engage in advocacy and its scholars’ opinions are their own. MEI welcomes financial donations, but retains sole editorial control over its work and its publications reflect only the authors’ views. For a listing of MEI donors, please click here.