Fighting in Afghanistan could be stopped "in weeks" if Pakistan told the Taliban to end the insurgency, the head of the Afghan army has told the BBC.
Gen Sher Mohammad Karimi said Pakistan controlled and gave shelter to Taliban leaders, deliberately unleashing fighters on Afghanistan.
Pakistan denies controlling the Taliban and says the comments are "malign".
It was one of the Taliban's main supporters from its launch in 1994 until the 2001 fall of the regime.
Most of the Taliban's leaders reportedly then fled to Pakistan and the group is still considered to be heavily dependent on the support of certain elements in the country.
"The Taliban are under [Pakistan's] control - the leadership is in Pakistan," Gen Karimi told the BBC's Hardtalk programme.
"Madrassas have been closed and all the Taliban have been unleashed to Afghanistan."
Afghanistan could achieve peace if this was desired by both the US and Pakistan, said the general.
"If [Pakistan] put pressure on [Taliban] leadership or convinced them what to be done, that can help a lot," he added.
A Nato report leaked in April said Pakistan was aware that Taliban leaders were taking refuge within its borders.
But Pakistan consistently denies wielding influence over the Taliban, saying many militants have based themselves across the border in Afghanistan's eastern province of Kunar, from where they are known to have carried out attacks in north-western Pakistan.
"The allegations that Pakistan 'controls' the Taliban and has 'unleashed' them on Afghanistan have no basis," a foreign ministry spokesman said.
"We reject them categorically. Pakistan has exercised extreme restraint in the face of highly provocative language used by the Afghan civil and military officials over the last few months, not to mention some totally fabricated accusations."
The spokesman said that such comments reflected "insincerity" on the part of some elements in the Afghan government and that Pakistan was fully supportive of the reconciliation process.
"Pakistan will not be deterred in its efforts to support the international community's efforts to bring peace and stability to Afghanistan," he said.
Securing the long, porous border between the two countries has long posed a major challenge to the authorities.
Lack of trust
Gen Karimi's comments come at a sensitive time, says the BBC's Richard Galpin in Islamabad.
The US is pushing for peace talks with the Taliban as Nato combat troops continue to withdraw from Afghanistan - a process due to be completed next year.
Last month the Taliban opened their first official overseas office in the Qatari capital, Doha - the first step ahead of the expected peace talks.
US and Afghan leaders want the Taliban to join the Afghan government as a result of the peace process.
They say peace talks will succeed when the Taliban finally sever all ties with al-Qaeda, end violence and accept the Afghan constitution, including its protections for women and minorities.
Pakistani officials are adamant that Pakistan's "legitimate interests" in Afghanistan must be recognised after the withdrawal of Nato troops.
The Taliban insist on the complete withdrawal of foreign forces as a pre-condition to becoming part of a political settlement in Afghanistan.