US Defense Secretary Jim Mattis met with top Afghan leaders during an unannounced visit to Kabul on Friday, adding his weight to a flurry of diplomatic efforts to bring the Taliban to the negotiating table.
His trip comes a little more than a year after President Donald Trump unveiled a revamped strategy for Afghanistan that saw him commit thousands of additional US forces to the war-torn country on an open-ended basis.
Mattis, on his fourth visit to Afghanistan since becoming defence chief in January 2017, has met with President Ashraf Ghani and the new US commander for American and NATO forces, General Scott Miller.
His arrival in Kabul comes at a sensitive time in the 17-year war.
The grinding conflict has seen little progress by Afghan or US forces against the Taliban, the country's largest militant group.
Six US soldiers have been killed in Afghanistan so far this year, the most recent happening on Monday in an apparent insider attack.
Ghani told Mattis that preventing so-called "green-on-blue" attacks, in which Afghan soldiers turn their weapons on international troops with whom they are working, was a "top national priority".
They also discussed other issues including the peace process, security reforms, upcoming parliamentary and presidential elections, and Pakistan, according to a statement from the presidential palace.
Afghan and international players have been ratcheting up efforts to hold peace talks with the Taliban, which was toppled from power by US-led forces in 2001.
An unprecedented ceasefire in June followed by talks between US officials and Taliban representatives in Qatar in July fuelled hopes that negotiations could bring an end to the fighting.
- Battlefield setbacks -
But a recent spate of attacks by the Taliban and the smaller but potent Islamic State group that left hundreds of people dead has severely dented that optimism.
A twin bomb attack on a wrestling club in a Shiite neighbourhood of Kabul on Wednesday was just the latest in a long line of devastating assaults, killing at least 26 people and wounding 91.
The attack underscored the challenges facing Afghanistan's beleaguered security forces, which have been beset by corruption and low morale.
Trump's strategy, announced in August 2017, increased the US troop presence in the country and now includes a renewed push to bring the Taliban to the negotiating table.
Speaking to reporters as he headed to Asia this week, Mattis said he had reason to hope the Taliban may be ready for talks.
There's "still hard fighting, but right now we have more indications that reconciliation is... no longer just a mirage", he said, adding that Afghan security forces were now taking the fight to the enemy.
But there are fears that Trump is growing frustrated with the pace of progress in the country, spurring US diplomats and other officials to intensify their efforts.
The Taliban have long insisted on direct talks with Washington and refused to negotiate with the Afghan government, which they see as illegitimate.
There is speculation that another meeting between US and Taliban representatives could be held this month.
US Secretary of State Mike Pompeo visited Islamabad on Wednesday where he said he was "hopeful" of resetting the troubled relationship with Pakistan, a key player in the Afghan conflict.
He made the remarks after confirming that Zalmay Khalilzad, a high-profile former US ambassador to Kabul, Baghdad and the United Nations, would be appointed to lead peace efforts in Afghanistan.
Miller, who took command of US and NATO forces at a handover ceremony in Kabul on Sunday, replaces General John Nicholson, who rotated out of the role after a more than two-year deployment.
Nicholson told reporters last month that the warring parties now had an "unprecedented" opportunity for peace, and insisted Trump's strategy for the country was working.
But his positive outlook belied recent setbacks on the battlefield, including last month's extraordinary raid by the Taliban on the provincial capital of Ghazni -- just a two-hour drive from Kabul.
Militants held large parts of the city for days and Afghan forces needed US air power to push them back.