Mattis said the ultimate victory in Afghanistan will be a "political reconciliation" between Kabul and the Taliban, with a country capable of handling its own security.
Elements of the Taliban are open to talks with the Afghan government, US Defense Secretary Jim Mattis said Tuesday as he arrived in Kabul on an unannounced visit.
Taliban fighters have taken control of a district in Afghanistan's Farah province, making it the first district to fall into their hands in 2018, after clashes in which 10 members of the security forces were killed, officials said on Monday.
The Taliban is likely to miss an Afghan peace conference at which participants are set to call for direct talks between the militant group and the government of President Ashraf Ghani, the foreign ministry in Uzbekistan said on Monday. Ghani in February offered recognition of the Taliban as a legitimate political group as part of a proposed process he said could lead to talks.
"We've had some groups of Taliban - small groups - who have either started to come over or expressed an interest in talking". "But there are elements of the Taliban clearly interested in talking to the Afghan government", he said. "We want the Afghans to lead and provide the substance to the reconciliation effort", he told reporters.
"We do look toward a victory in Afghanistan".
Reconciliation, Mattis said, was "almost an equal priority of my interest going in".
As part of the so-called South Asia Strategy, President Donald Trump previous year ordered the increased bombing of Taliban targets - including drug-making labs and training camps. The group ruled Afghanistan until 2001 when it was defeated by a United States -led troops in the wake of the September 11 attacks and it is fighting to restore Islamic rule in the country.
Mattis said he had seen some positive indications from Islamabad, noting some Pakistani military operations along the border.
The Taliban has previously offered to hold talks on a possible peace agreement, but only directly with the United States, which Mattis rejects.
Mattis also said he had seen some changes in Pakistan's behaviour since Trump blasted the country past year for harbouring the Taliban.