US Defence Secretary Ashton Carter reiterated Washington's support for "courageous" Afghan security forces today, days after the United States and NATO pledged to keep thousands of troops in the troubled country.
Carter spoke as President Ashraf Ghani welcomed the "environment of trust" between Washington and Kabul at a joint news conference in the Afghan capital.
"The Afghan security forces have demonstrated the motivation, the will and the resilience in the face of a persistent enemy," Carter said.
More From This Section
The Pentagon chief's unannounced visit follows a renewed commitment to Afghanistan from NATO, which said over the weekend it would keep forces there until the end of 2017 at least.
Most are American, but around 40 countries have deployed troops there. Their official role is to train Afghan forces, which are now responsible for their country's security.
Despite a massive, nearly 15-year international effort to defeat the Taliban, the resurgent group controls large areas of Afghanistan and has vowed to keep fighting until foreign forces leave.
Both Carter and Ghani also addressed the role of Afghanistan's neighbour Pakistan, long accused by Kabul of sponsoring militants including the Taliban.
Taliban chief Mullah Akhtar Mansour was killed by a US drone in Pakistan earlier this year in a strike that Islamabad said violated its sovereignty.
But Carter, while stressing the US would work with Pakistan "wherever it can" on extremism, warned that Washington would "continue to target and strike terrorist leaders everywhere in the world where they might threaten Americans or our interests and our friends".
"Pakistan has a fundamental decision to make," added Ghani, who has loudly demanded in the past that Pakistan take action against the Taliban. "There is no difference between good terrorists and bad terrorists."
President Barack Obama, elected eight years ago on a pledge to end the wars in Afghanistan and Iraq, has been unable to do so given the fragile security situations in both countries.
Last week he dialled back plans to cut US troop numbers in Afghanistan from 9,800 to 5,500 by the end of the year.
Instead, around 8,400 US troops will remain, providing training and air support to the Afghans.