Former military ruler and Pakistan and military ruler Parvez Musharraf, who was accused of sheltering and supporting the Taliban, has called for an end to the backing of militant "proxies" in Afghanistan.
In an interview to The Guardian, Musharraf admitted that when he was in power, Pakistan sought to undermine the government of former Afghan president Hamid Karzai because Karzai had "helped India stab Pakistan in the back".
But now the time had come to "totally cooperate" with Ashraf Ghani, the Afghan president since September, who Musharraf believes is "the last hope for peace in the region".
"In President Karzai's times, yes, indeed, he was damaging Pakistan and therefore we were working against his interest. Obviously we had to protect our own interest," Musharraf said.
"But now President Ashraf Ghani has come and he is trying to restore balance in Afghanistan. We must totally cooperate with him."
Speaking from his Karachi home, the former army chief said "Pakistan had its own proxies, India had its proxies, which is unhealthy".
More From This Section
"I do admit this it is most unhealthy. It is not in favour of Afghanistan, or Pakistan or India. It must stop," he said.
Musharraf said Pakistani spies in the Inter-Services Intelligence directorate (ISI) cultivated the Taliban after 2001 because Karzai's government was dominated by non-Pashtuns, the country's largest ethnic group, and officials who were thought to favour India.
"Obviously we were looking for some groups to counter this Indian action against Pakistan," he said, adding that ISI was in contact with the Taliban groups.
The army remains deeply suspicious of India, a country that has beaten Pakistan in three conflicts since independence and played a critical role in the secession of Bangladesh from Pakistan in 1971.
Musharraf insists he is not an "India hater", but bristles at what he says are Western bias towards Pakistan's giant neighbour.
"India is the greatest democracy, promoter of human rights and democratic culture? All bullshit," he said. "There is no human rights.
"The religion itself is anti-human rights. In the rural areas, if even the shadow of an untouchable goes on a pandit, that man can be killed."
Like many soldiers, he is convinced that India, through its Research and Analysis Wing (RAW), backs regional separatists in an effort to break up Pakistan.
"The RAW of India, the ISI of Pakistan have always been fighting against each other since our independence. That is how it continued, it continues now also.
"It must stop, but it can only stop when leadership on both sides show the will to resolve disputes and stop confrontation in favour of compromise and accommodation."
Musharraf has become increasingly vocal in recent months as his position in the country steadily improved after he suffered a series of setbacks in the wake of his disastrous return from self-exile in 2013.
A ban on standing in elections quashed his hopes of entering parliament. He was ensnared by a series of legal cases, including one murder charge.
Most seriously of all, Nawaz Sharif, the prime minister Musharraf ousted in a coup in 1999, won a landslide victory and initiated a treason trial for which the former dictator could be hanged if found guilty.
But Sharif's power has been curbed by a series of bruising fights with Pakistan's powerful military establishment and the treason case now appears tied up in legal wrangling.
Musharraf is still banned from leaving the country, which he says deprives him not just of the lucrative international lecture circuit, but also access to his homes in London and Dubai.
He said he misses his old life in his two favourite cities, where he could go to restaurants alone without the vast security required to protect him in Pakistan.
But he said his problems are nearly behind him, and that he has the army to thank. "I'm very proud of my institution. Whatever they are doing to help me, to protect the honour and dignity of their ex-chief, I'm proud of that," he said.