KABUL (Reuters) - The resignation of Afghanistan's spy chief this week has highlighted divisions in Kabul over whether President Ashraf Ghani should involve Pakistan as he bids to revive peace talks with Taliban militants that collapsed in July.
Ghani, who traveled to Islamabad this week for a security summit, insists Pakistan must be on board if the peace process is to succeed, raising protests among those who say their neighbor effectively controls the militants.
Pakistan denies it, but historic links between its intelligence service and the Islamist insurgents mean many Afghans believe the movement would be significantly weakened if Islamabad did more to stop it.
Rahmatullah Nabil resigned as head of the National Directorate of Security (NDS) on Thursday after months of tension with Ghani, fueled in part by the Taliban's brief seizure of the northern city of Kunduz in September for which intelligence failures were partly blamed.
But sharp differences over how to deal with Pakistan also contributed to his departure, which leaves Afghanistan without a defense minister and head of intelligence at a time when the insurgency is gaining potency.
"I am very concerned with the security situation when the Taliban are able to overrun or threaten our provinces and when we have no head of defense or intelligence," said Farhad Sediqi, a member of parliament from Kabul.
Nabil had opposed a ground-breaking intelligence sharing agreement with Pakistan in May and was strongly critical of Ghani's latest attempt to improve relations with Pakistan at the Heart of Asia regional security conference this week.
Afghan social media was flooded with angry attacks on the government, with many pointing to headlines in Pakistani newspapers welcoming Nabil's departure.
There was sharp criticism from politicians as well.
"Pakistan always wanted Nabil to go and it happened," said Shakiba Hashemi, a member of parliament from the southern city of Kandahar.
Ghani angrily rejected suggestions that Nabil's resignation was prompted by pressure from Pakistani officials to get rid of a man who made no secret of his hostility towards them.
"No one can interfere in our security sector," he told a news conference on Friday. "These kinds of allegations are unacceptable and we will never allow a foreign country to interfere in appointments," he said.
Deputy head of the NDS, Mohammad Massoud Andarabi, will take over as acting leader of the agency.
Ghani is counting on Islamabad's help to revive the peace process over the coming months to head off the traditional start of the main fighting season in spring.
The ongoing threat posed by the Taliban was underlined this week by a raid on the airbase in Kandahar, Afghanistan's second biggest city and a longstanding base for the insurgency.
Fifty civilians and security forces personnel were killed and dozens more wounded in the biggest raid by Taliban fighters since they seized Kunduz in September.
Ghani condemned the attack, but on Friday, he repeated there was no alternative to involving Pakistan in the peace process.
"Without Pakistan's positive role, will the fighting continue in Afghanistan or not?" he said at a news conference on the outcome of the summit. "The nation must answer this."
"There will be ups and downs as regards the peace process in coming months, but without it our fundamental interests are in danger," he said.
Writing by James Mackenzie; Editing by Mike Collett-White