Image copyright Getty Images Image caption Rizwan Akhtar has experience battling the criminal gangs of Karachi as well as the militants of the north-west

Pakistan's army has named a new head of the country's feared spy agency, the Inter-Services Intelligence (ISI).

Rizwan Akhtar was promoted from major-general to lieutenant-general to assume the new role and is considered an ally of army chief Gen Raheel Sharif.

As head of the paramilitary Rangers force in the southern city of Karachi he launched a major operation against criminal gangs and Taliban militants.

He replaces Lt-Gen Zaheerul Islam who is scheduled to retire in October.

The BBC's Shahzeb Jillani says the outgoing ISI chief is widely seen to have been at odds with Prime Minister Nawaz Sharif, with some even accusing him of encouraging recent protests against the government.

Image copyright AP Image caption Outgoing ISI chief Zaheerul Islam is seen by some as encouraging anti-government protests

The military also promoted five other officers to lieutenant general rank to replace outgoing personnel.

The appointments are expected to help the latter consolidate his position, our correspondent says.

Although Pakistan saw its first democratic civilian transfer of power last year, the country has been ruled by the army for much of its history.

The ISI was established in 1948 - as Pakistan engaged India in the first war over Kashmir - and became the primary institution running the intelligence operations of the army, air force and navy.

Analysts say that although its precise machinations have remained shadowy, there is little doubt it has played a major role in Pakistan's volatile politics.

Rizwan Akhtar's operation to reduce crime levels in Karachi received a lot of publicity but human rights activists also warned of violations.

Between 2007 and 2010, he was posted in the South Waziristan tribal region where Pakistan Taliban militants are known to have sheltered.

"He is a professional soldier who has experience of both Fata and internal security in Karachi," an army official told the Dawn newspaper.