Afghan president Hamid Karzai has claimed the Taliban are being propped up by neighbouring Pakistan, saying the militants cannot lift a finger without the Pakistanis.
As the war reached its tenth anniversary, he told the BBC the war will only end when something is done to clear insurgents from their sanctuaries across the border in Pakistan.
The invasion by the US and its allies was aimed at toppling the hard-line Taliban regime and punishing it for giving safe harbour to al Qaida, which orchestrated the September 11 attacks on the United States.
Over the years, the US-led coalition became mired in a battle against insurgents who continue to plant bombs and stage suicide attacks and assassinations of top Afghan figures.
"Definitely, the Taliban will not be able to move a finger without Pakistani support," Mr Karzai said. "The fact is the Taliban were and are stationed, in terms of their political headquarters and operational headquarters, in Pakistan. We all know that. The Pakistanis know that. We know that."
Militant sanctuaries in Pakistan will not go away unless the government of Pakistan co-operates with Afghanistan and the international community finds an effective way to remove the hide-outs, he said.
"We're not saying this in a manner of accusation and reprimand," he added, trying not to inflame already strained relations between the two nations. "We are saying this in a manner of a statement intended towards a solution of the problem."
Pakistan maintains it cut off ties to the Taliban and other militants following the US invasion of Afghanistan, but Washington and Kabul say otherwise.
President Barack Obama said on Thursday that Pakistan was "hedging its bets" by maintaining ties to militant groups trying to undermine the Afghan government. Mr Obama also acknowledged that the United States has not been able to persuade Pakistan that the US goals of a stable Afghanistan pose no threat to Pakistan.
In the wide-ranging interview, Mr Karzai candidly said the Afghan government and international allies have failed to provide security for the Afghan people. He also said that his government wants to talk to the Taliban, but does not know where to contact legitimate representatives of the insurgency.