The Pentagon's top official made an unannounced visit to Afghanistan on Monday to meet with US commanders and Afghan leaders amid a push for peace with the Taliban.
Pat Shanahan, the recently installed acting secretary of defense, said he has no orders to reduce the US troop presence, although officials say that is at the top of the Taliban's list of demands in exploratory peace negotiations.
Mr Shanahan said he is encouraged that President Donald Trump's administration is exploring all possibilities for ending a 17-year war, the longest in American history.
But he stressed that peace terms are for the Afghans to decide. Thus far the Taliban have refused to negotiate with the government of President Ashraf Ghani, calling it illegitimate. Washington is trying to break that impasse.
"The Afghans have to decide what Afghanistan looks like. It's not about the US, it's about Afghanistan," Mr Shanahan told reporters traveling with him from Washington.
Zalmay Khalilzad, the administration's special envoy for Afghan peace talks, said on Friday that although talks are in an early stage, he hopes a deal can be made by July. That is when Afghanistan is scheduled to hold a presidential election.
Mr Shanahan, a former Boeing executive who had never been in Afghanistan until Monday, was scheduled to meet with Mr Ghani and other top government officials.
Mr Shanahan took over as acting secretary of defense on January 1 after Jim Mattis submitted his resignation in December. Mr Shanahan had been Mattis' No. 2.
Mr Shanahan's views on the Afghan war are not widely known. He said he would use this week's visit to inform his thinking and to report back to Trump.
In testimony before Congress last week, General Joseph Votel, the commander of US Central Command, offered a largely optimistic view of Afghanistan, saying the current maneuvering between US and Taliban negotiators is "our first real opportunity for peace and reconciliation since the war began".
Mr Votel noted that the Taliban are still capable of inflicting significant casualties on Afghan government forces. Just last week the insurgents killed some two dozen Afghan troops in an attack on an army base in northern Kunduz province.
In addition to battling the Taliban, US and coalition forces in Afghanistan are focused on an ISIS affiliate known as ISIS-Khorasan, comprised of foreign fighters largely from Pakistan. "Left unchecked," Mr Votel said in his report to Congress, ISIS-Khorasan "will continue to grow as a threat to our homeland."
In his remarks to reporters during his flight to Kabul, Mr Shanahan said that although the ISIS presence in Syria "has been decimated," local Syrian security forces are needed to ensure stability. He said ISIS still has a global presence.
"If something hasn't been completely eradicated, there is a risk of it returning," he said.
Mr Trump has taken an ambivalent approach to Afghanistan, saying his instinct upon entering office in 2017 was to withdraw. Yet he chose instead to add about 3,500 troops in 2017-2018 to bolster the US effort to train and advise Afghan forces. After Mr Mattis resigned in December, Mr Trump insisted that he had been unhappy with how Mr Mattis handled Afghanistan. Since then, the administration has said it achieved a tentative "framework" for fuller peace negotiations with the Taliban.
"We do not know whether we will achieve an agreement," Mr Trump said in his State of the Union address to Congress last week, "but we do know that after two decades of war, the hour has come to at least try for peace."