The past month has raised a number of questions in Pakistan over not only the future direction of the country's premier intelligence agency, the ISI, but also who it answers to. On October 6, Pakistan's military announced the reassignment of Lt Gen Faiz Hameed, who has been the agency's director-general for more than two years, to the command of the army's XI Corps, based in Peshawar. The announcement was made as a matter of course; while the ISI reports directly to the prime minister, in practice its director-general, who is by convention a serving army officer, answers to the head of the army, currently Gen Qamar Bajwa. When Gen Bajwa decided that it was time for Lt Gen Hameed to redeploy to Peshawar, it was simply announced by the military. While it is clear enough that Lt Gen Hameed can be transferred on the order of Gen Bajwa, it is much less clear how much legal authority the army chief has in deciding who will replace him. The convention over the years has been that the prime minister appoints a new ISI director-general after consultation with the army chief, from a shortlist provided by the military. In recent years that "consultation" process has increasingly become a mere formality. For nearly three weeks, Prime Minister Imran Khan has hung his hat on this formality and refused to sign off on Gen Bajwa's preferred candidate, Lt Gen Nadeem Anjum – in effect delaying the transfer of Lt Gen Hameed and a host of other senior appointments across the army’s command structure. For Pakistan's military, which undoubtedly would have interpreted this as interference in its personnel changes by the civilian branch of government, this was an unprecedented, and disturbing, development. It also drew attention within Pakistan to the constitutional and legal ambiguity over who exactly commands the ISI. The prime minister's authority to oversee intelligence is essentially at odds with the military's HR rules. The fact that Mr Khan appeared to contradict the army for a moment raised eyebrows about whether the army and the government are still on the "same page" that both parties have regularly boasted of ever since Mr Khan’s government was sworn into office in 2018 with strong military support. After all, even though the ISI chief's appointment by the prime minister is constrained by an army shortlist, the fact that the shortlist exists has long provided Pakistan’s civilian leaders with a valuable measure of leverage over generals competing for the job. For Mr Khan, however, that is not the issue at all. He seems neither to have been trying to exert his leverage over the military, nor to have been reconsidering his alliance with it. In reality, his reluctance to let Lt Gen Hameed go seems to have been a clumsy effort to maintain that alliance. Lt Gen Hameed and Mr Khan are close, and the former has been integral in shaping the latter's policies towards Afghanistan, where the Taliban's takeover has put Pakistan at an important geopolitical crossroads. Given that Pakistan's army is a large institution with regular personnel turnover, the risk for Mr Khan is that it will soon be headed by figures who lack strong personal ties to him. The ISI chief is a unique position for officers, because the title-holder is a principal adviser to the prime minister, and Mr Khan reportedly told his Cabinet last month that he wants to keep Lt Gen Hameed in the role for "a while". Mr Khan is even said to be in favour of Lt Gen Hameed eventually succeeding Gen Bajwa as Pakistan's top military officer. Ironically, one of the reasons for this drama may be that Gen Bajwa shares the same desire; Lt Gen Hameed is something of a protege to him. But whereas Mr Khan is thinking like a politician, trying to keep his friends close, Gen Bajwa is thinking like an officer, trying to groom Lt Gen Hameed through the ranks of service. By the Pakistan Army's internal conventions, only someone who has commanded a corps, the army's largest and most complex combat formation, is seen as a candidate fit to command the army as a whole. By posting Lt Gen Hameed to lead XI Corps, Gen Bajwa was putting him in a strong position to succeed him. Divisions between the prime minister and the army – especially ones like this, born of the gap between constitutional and political reality – are particularly unnerving at a time of rising popular discontent with Mr Khan's party. Firm backing from the military is essential to deterring exactly the kind of street agitations and media campaigns that undermined the government of his predecessor and rival, Nawaz Sharif. Worse still, by creating such a long delay in the ISI succession process, Mr Khan has possibly overplayed his hand. The Pakistan Army has publicly indicated on more than one occasion that it regards itself as the guardian of the country’s ideological and political frontiers, not just its territorial ones. It has long promoted a belief that the political class cannot be trusted to rise above their personal self-interest and act in the national interest. This has justified zealous defence of its independence from political "interference" that elsewhere is regarded as basic democratic oversight. And so, after mounting frustration from the army, Mr Khan relented, and last week announced that Lt Gen Anjum would take over from Lt Gen Hameed later this month. And because of the damaging optics, and the fact that it is now obvious Mr Khan would have preferred Lt Gen Hameed to stay, Lt Gen Anjum owes the Prime Minister nothing. Mr Khan's leverage is wasted, and that risks publicly diminishing his influence over the ISI.