Pakistan has named a new head of its main intelligence agency, considered the second most powerful official in the military after the army chief.
Rizwan Akhtar, who is considered to be a close ally of the army chief, will take over the Inter-Services Intelligence (ISI) agency next month.
The head of the spy agency is one of the most important posts in Pakistan, at the intersection of domestic politics, the fight against armed groups and Pakistan's foreign relations.
It is also one of the most controversial, given accusations against the ISI of meddling in domestic politics and having ties to the Afghan Taliban and other groups fighting the US-led NATO troops in Afghanistan, charges the military denies.
Although the ISI officially reports to the prime minister, in reality it is controlled by the army chief, in this case General Raheel Sharif.
Akhtar was previously head of the paramilitary Rangers force in the southeastern province of Sindh, where he led a major operation against armed groups and criminal gangs in Karachi, the country's financial hub.
The operation has reduced crime levels but was criticised by human rights activists over allegations of extra-judicial killings and torture.
The naming of Akhtar as director general comes at a difficult time for Prime Minister Nawaz Sharif, whose position has been significantly weakened by weeks of anti-government protests demanding his resignation.
Some ruling party officials have accused the military and the ISI of instigating the unrest in order to weaken and sideline Sharif.
Several government ministers told Reuters this month that the current head of the ISI, General Zaheer-ul-Islam, was among those pushing for the prime minister's ouster.
"For Nawaz Sharif, the bottom line is that he doesn't want another Zaheer," said a defence ministry official, summing up what the prime minister was looking for in his new spy chief.
Some believe the appointment may be an opportunity to cool down tensions between Pakistan and its rival nation India.
The nuclear-armed neighbours have fought three wars and Pakistan's army uses the perceived threat from India to justify its huge budget and national importance.
In a 2008 publication while he was at the US Army War College, Akhtar argued that Pakistan "must aggressively pursue rapprochement with India." In the same paper, he criticised US policy in Afghanistan and Pakistan.