US Secretary of State Rex Tillerson paid a surprise visit to Afghanistan on Monday to discuss Washington's new strategy with President Ashraf Ghani.
Tillerson reiterated the US commitment to working with the Kabul government and regional partners "to achieve peace in Afghanistan and deny safe havens to terrorists who threaten that goal", said a US embassy statement posted on Twitter.
The meeting took place at Bagram Airfield, America's largest base in Afghanistan, as the resurgent Taliban step up attacks on Afghan police and troops in response to the US strategy announced in August.
"Clearly we have to continue to fight against the Taliban, against others, in order for them to understand they will never win a military victory," Tillerson told reporters after the meeting that was also attended by Afghan Chief Executive Abdullah Abdullah.
It was Tillerson's first trip to Afghanistan as secretary of state and comes several weeks after US Defence Secretary Jim Mattis also paid an unannounced visit.
The closed-door talks covered Ghani's reform programme, his anti-corruption strategy and preparations for parliamentary elections due to take place next year.
US President Donald Trump "has declared that we are here to stay until we can secure a process of reconciliation and peace", Tillerson said, adding: "It's not an unlimited commitment."
Tillerson's unannounced visit follows one of the bloodiest weeks in Afghanistan in recent memory, with more than 200 people killed in multiple attacks on security installations and mosques across the country.
A spokesman for the militants said last week the attacks were "a clear message... the enemy who thought they had scared us with the new Trump strategy have now been given a lesson".
The Taliban have been rampant since the withdrawal of Nato combat forces at the end of 2014.
Trump has cleared the way for the deployment of thousands more US troops in an open-ended commitment and there has been a surge in US airstrikes, but the insurgency has only intensified.
Militants fired several rockets into Kabul on Monday morning but there were no casualties.
During Mattis's visit last month Taliban militants fired multiple rockets towards the city's international airport in an attack that killed one person and wounded 11 others.
Tillerson is due to fly to Pakistan on Tuesday where he will pressure Islamabad to take action on the support Taliban and other "terrorist organisations" receive in the country.