Kayani has taken the lead since unrelenting monsoon rains brought on a natural disaster that has so far left 1,600 dead, 2 million homeless, and disrupted the lives of up to 18 million more. Images of Kayani helicoptering around Pakistan taking stock of the tragedy provided a stark contrast to those of President Asif Ali Zardari helicoptering to his chateau in France as floodwaters swelled, adding to the perception that the civilian government was failing its people.
Despite his role as chief of the world's largest Muslim army, however, little is known about the 58-year-old, chain-smoking general.
Admirers describe Kayani as a man of few words who has largely remained in the shadows even as he has risen quickly through the ranks -- from second lieutenant (or junior commissioned officer), to head of the Inter-Services Intelligence agency (ISI), to General Pervez Musharraf's successor as the country's top military man.
Septuagenarian General Talat Masood, who served in the army for nearly four decades and is now an influential analyst, says Kayani is perhaps the best military chief in the nation's checkered 63-year history.
Over that time, four military dictators trampled elected governments and ruled the country for more than three decades. Masood, who has been consulted by Kayani at times, sees key differences in the approach used by this military commander.
"He does a lot of reflection and intellectually he is very profound," Masood says. "I think he goes at the best of the problem and has a much better understanding of the world and the region as a whole. And I would say that his understanding of national affairs, in comparison to his predecessors, and of the regional affairs is far more pragmatic and [he] has a greater depth in his understanding."
The son of a military man, Kayani enjoys a reputation as a "soldier's soldier" who garners the respect of his troops and Western contemporaries alike. A father of two, he was born in Gujjar Khan, a region close to the military headquarters near Islamabad that is known for providing generals and "jawans" (soldiers) to the military. During various stages of his nearly four-decade military career, Kayani attended training in some of the finest U.S. military institutions, and is considered a good listener with a keen understanding of his surroundings whether in the political arena or on the battlefield.
Upon taking over from military dictator Musharraf in November 2007, he set about modernizing and overhauling a military force deeply entangled in national politics and regional rivalries.
His performance was impressive enough to lead Prime Minister Yousaf Raza Gilani to hand him an unprecedented three-year extension earlier this year, keeping him in his post until 2013.
His continued presence is generally seen as a good omen for stability and democracy in Pakistan. His recent success in delivering aid and rescuing people in remote regions has led some to speculate about whether his leadership might be an improvement over the current government. At a minimum, analysts say, his success will further cement the military's traditional hold on politics.
Kayani, who saw treacherous Pakistani politics up close as late Prime Minister Benazir Bhutto's deputy military secretary in her first government in 1988, has since taken pains to distance himself from politics. In 2008, for example, he oversaw what were widely regarded as fair national elections after which he ordered subordinates to break off all contacts with politicians. Since then, the military has refrained from micromanaging domestic politics or policy making, choosing to step in only when its own interests are at stake.
Complex Juggling Act
Kayani's main strategic focus since taking command has been the complex Al-Qaeda-inspired Islamist insurgency, a daunting task that led him to take the popular step of ordering all military officers back from their civilian administrative jobs to ready for the battlefield.
He has taken the fight to the insurgents, launching large-scale military operations in the Pashtun northwest. But those maneuvers have also led to retaliation, with militants increasingly targeting the central Punjabi heartland where some militants' networks are deeply entrenched. Meanwhile, a separate secessionist Baluchi insurgency lurks as a less violent but nonetheless major domestic threat.
Across Pakistan's eastern border lies a much bigger nuclear-armed military threat, making India a major focus for Kayani. To the west, his relationship with allies is complicated. Western leaders periodically express concerns about Islamabad's perceived support for the Afghan Taliban and question Pakistan's reluctance to go after India-centric Islamist militant groups instrumental in a two-decade old insurgency in the disputed Himalayan region of Kashmir.
Haider Mullick, a fellow at the U.S. Joint Special Operations University, cites the immense challenges that lie before Kayani.
"[Kayani must] come up with a new relationship with India [while] at the same time balancing the relationship with China and the United States and being able to achieve [Pakistani] national security objectives inside Afghanistan -- that is, an Afghanistan that is not perceived to be pro-India and at the same time is not harboring Al-Qaeda," Mullick says. "But everything between that is very gray and it remains to be seen. He has some things that are working for him and other things that are not, and there are serious grave challenges and also great opportunities for him to change the security calculus of that region and his own army."
Mullick, who recently made several trips to Pakistan to study counterinsurgency under Kayani's leadership, describes him as an "innovative revolutionary" who inspires confidence in his ranks.
Such confidence appears to derive from his steely commitment to doing things on his own terms while keeping the focus on duty by maintaining separation between the government and military.
He has pulled off tricky juggling acts of interests that could prove to be the downfall of others in his position. For example, Mullick says, Kayani has managed to push out those in his intelligence services who were not on board in the war against the Tehrik-e Taliban Pakistan (Movement of the Pakistani Taliban) and Al-Qaeda.
Kayani has also proven to be an adept navigator in his dealings with the United States, which, as former U.S. diplomat in Islamabad Larry Robinson explains, are no easy task.
"There is the suspicion of anything Pakistan does and certainly anything Pakistan army does on the part of most Afghans and many Americans," Robinson says. "And then the claims within Pakistan that all this fighting is unnecessary and is only done at the behest of those same Afghans and the Americans who are completely ungrateful for Pakistan's sacrifices. I don't think you get much more challenging than that."
But at the risk of being seen as being too cozy with Washington, Kayani's relationships with U.S. military leaders Admiral Mike Mullen and General David Petraeus have provided him with a steady supply of much-needed training and equipment.
While accepting the challenge thrown down by the United States to root militants out of their long-standing safe havens in Pakistan's northwest, Kayani has stubbornly resisted moving into the country's most dangerous militant hotbeds, such as the western North Waziristan tribal district on the Afghan border, considered the regional headquarters of Pakistani, Afghan, Central Asian, and Al-Qaeda militants.
And although he has been open to discussion with outsiders, he has by no means been overeager.
Even as his relationship with Afghan President Hamid Karzai has flowered, for instance, they differ on reconciliation with Pakistan-based Afghan insurgent networks. And while many in Kabul and Washington oppose power-sharing with Gulbuddin Hekmatyar and Jalaluddin Haqqani -- two hard-line Afghan Islamist leaders -- Kayani has made clear that Islamabad would not mind seeing the two in a post-reconciliation Afghan government.
Domestically, he has resisted calls by some Pakistanis who want him to move against Al-Qaeda-allied sectarian militias targeting his Punjabi home base, from where most of his officers and soldiers are recruited.
Mullick suggests that Kayani has promised "piecemeal" operations against all militants, but that his priority is to concentrate his efforts on those who jeopardize Pakistani security.
In times of high uncertainty, Kayani potentially faces another minefield -- Pakistani politics. Hamid Hussain, a New York-based analyst of Pakistani security affairs, says that Kayani might be dragged into domestic politics.
A confrontation between the increasingly assertive Pakistani Supreme Court and coalition civilian administration looms after the court scrapped Pervez Musharraf's political amnesty in 2007, causing major embarrassment to the government and led to the reopening of many corruption cases against ministers. Zardari to this point has been spared intense scrutiny into alleged corruption due to presidential immunity.
Hussain says an open confrontation between the two state institutions would almost certainly push Kayani, as leader of the most powerful institution in the country, to intervene.
"If the Supreme Court decided to go after the president and if a crisis occurs then he may have to come in," Hussain says. "And depending on his own inclination, whether he sides with the judiciary to let the president get out of that place, that's the only crisis I potentially see. [One] in which, he has to come in and arbitrate with different players."
Already, Kayani's behind-the-scenes maneuvers have been credited with the reinstatement in 2009 of current Pakistan Chief Justice Iftikhar Muhammad Chaudhry, who was twice sacked by Musharraf.
Given the military's tremendous clout, its disagreements with the civilian leaders are not inevitable. An example is a less pronounced disagreement over the way forward in the FATA, which currently is the biggest theater for Pakistani military. In August 2009, Pakistani President Zardari announced reforms of its century-old, British colonial-era legal and administrative regime. But the military vetoed the announcement, according to senior politicians who see Kayani as loyal to the army's political interests.
The current desperate humanitarian crisis at home might prompt calls for a more direct political role for the military. In that light, Kayani's biggest challenge yet could prove to be continuing to buck tradition by supporting the civilian government and ensuring that the political system remains on course.
With a clean break from the legacies of his predecessors, Kayani's military brilliance could serve Pakistan well as it continues down a path of democracy.