Davos - As US-Taliban peace talks take place in Qatar, Afghan President Ashraf Ghani said any eventual truce between the insurgents and Afghanistan must respect his country’s constitution and legal framework.

The president made the remarks in Davos during a public conversation, and his office released the transcript Friday to media. Ghani went on to suggest that only an Afghan-led dialogue should decide the fate of foreign troops present in the country.

The special representative for Afghan reconciliation, Zalmay Khalilzad, is heading the US team in its talks with Taliban envoys. As the meeting entered a fifth day Friday, there were signs of progress being made toward ending the deadly 17-year-old war - the longest overseas American military intervention.

“The function of ambassador Khalilzad’s office is to bring the Afghan government and the Taliban into face-to-face discussions and negotiations. Within that then, the larger issues of the US presence and other international issues will be addressed,” Ghani said.

Ghani emphasised the need for Washington to take into account the concerns of Afghanistan’s neighbours, including Russia and India, before reaching a deal.

The Taliban consider the U.S. as their main adversary in the Afghan war and dismiss the Kabul government as an illegitimate entity or an “American puppet.” Ghani has indirectly complained about the exclusion of his envoys but went public for the first time saying his administration is not even being informed about what is being discussed in Doha.

“There’s discussion, but this discussion needs to be shared back. A discussion that does not involve the region we will not trust,” said Ghani. “If we don’t get all the pieces right, one piece alone doesn’t suffice.” He was replying to a question about whether the talks have made any headway.

Ghani severely criticized the Taliban and maintained any understanding reached in Doha must be within the Afghan constitution and take into account Afghanistan’s international, as well as bilateral bindings, including those with the US and NATO.

“They [the Taliban] have relationships with all known terrorist groups. They have relationships with the largest criminal mafia on Earth, which after cocaine, is the heroin mafia. They have an organic relationship with the state of Pakistan that is providing them sanctuary, resources, support and [for] others,” asserted the Afghan president.

Islamabad rejects charges it hosts Taliban sanctuaries and says it is helping the United States as a shared responsibility to promote regional peace and to help end Afghan hostilities.

Pakistan has taken credit for arranging the ongoing peace process between the U.S. and the Taliban, saying its peace and stability are linked to a peaceful Afghanistan.

There was no immediate official reaction from the Pakistani government to Ghani’s remarks.

A senior Pakistani government official, while responding to sustained criticism emanating from Kabul, told VOA that Pakistan has “sincerely and faithfully diverted the recent positive environment in its relations with the US to the complete benefit of the Afghan peace process and Afghanistan as a whole.”

The official, while speaking on condition of anonymity, said “Afghans may never recognize or admit it, but if any nation after Afghans themselves feels their pain, it is Pakistan.”

Responding to a question during an interview with CNN, Ghani said he wants greater engagement with Pakistan as he claimed his country was “turning a corner.”

Ghani said he had spoken to Prime Minister Imran Khan but warned that Islamabad still needed to remove the “shadow of violence” in the country.  “Afghanistan wants an engagement with Pakistan,” Ghani said during a conversation with CNN’s Fareed Zakaria in Davos. But he said that the countries needed to engage on the “issue of terrorism.” Ghani said improved relations could also make Afghanistan a stabilising force in Pakistan.

Ghani remained optimistic that the country was on the right track to bringing an end to the 17-year war with the Taliban, which still involves thousands of US troops. “By 2024 Afghanistan will be self reliant,” Ghani said.

To a question, Ghani said more than 45,000 members of the country’s security forces have been killed since he became leader in 2014. The figure is far higher than previously thought, with Ghani saying late last year that 28,000 had been killed since 2015.

“The number of international casualties is less than 72,” he said on Friday. “It shows who is doing the fighting.”

“We need to get a stable Afghanistan that can ensure the security of Americans, Europeans, and others on the one hand, but more fundamentally our own democratic rights and institutions,” he added.