Lloyd Austin, U.S. secretary of defense, visits the National Cemetery in Seoul, South Korea, on Thursday. On his Asia tour, the defense chief made an unannounced visit to Afghanistan on Sunday.

Lloyd Austin, U.S. secretary of defense, visits the National Cemetery in Seoul, South Korea, on Thursday. On his Asia tour, the defense chief made an unannounced visit to Afghanistan on Sunday. / Bloomberg via Getty Images

Updated March 21, 2021 at 3:47 PM ET

U.S. Defense Secretary Lloyd Austin visited Afghanistan on Sunday amid uncertainty over how long American forces will stay in the country.

In his first trip to Afghanistan as defense chief, which had not been announced publicly, Austin met with Afghan President Ashraf Ghani as well as U.S. diplomat Ross Wilson and Army Gen. Austin Miller, America's top commander in the country.

"I'm here to listen and learn," Austin told reporters in Kabul. "It'll inform my participation in the review that we're undergoing here with the president."

The visit comes as the United States signals difficulties in withdrawing all its forces from Afghanistan by May 1, a deadline outlined in an agreement between the former Trump administration and the Taliban. It also comes as Afghanistan's government and the Taliban continue to work toward a peace deal to end decades of war, even as violent attacks continue.

As NPR's Diaa Hadid has reported, militants in recent months have carried out attacks on civilians, including assassinations of prominent Afghans.

Last week, President Biden said in an ABC News interview it will be "tough" to pull out all U.S. troops from Afghanistan by May 1, but if the deadline is extended, it wouldn't be by a "lot longer."

Secretary of State Antony Blinken warned in a letter to Ghani earlier this month that the Taliban could make quick territorial gains if American and NATO forces withdraw, The Associated Press reported. The letter reportedly said the U.S. was still considering the May 1 withdrawal, among other options.

Austin would not comment on when the U.S. will withdraw or whether the Taliban have met conditions for it to do so.

"It's obvious that the level of violence remains pretty high in the country, and we'd really like to see that violence come down," Austin said. "I think if it does come down, we can begin to set the conditions for some really fruitful diplomatic work."

The Taliban have warned of "a reaction" by the militant group if the U.S. doesn't pull out by May.

When asked about the warning, Austin said he wouldn't respond directly to the group but expressed confidence in Gen. Miller to "accomplish his mission" and "protect our troops."

Earlier, before Austin departed India, reporters asked him about an NBC News report that cited unnamed sources as saying last week that President Biden was considering keeping U.S. service members in Afghanistan until November.

"To my knowledge, the president has not made a decision or made any announcements on when he'll decide to remove the troops," Austin told the Post. But the defense chief did not deny that November is part of the discussion.

The Pentagon has said there are 2,500 U.S. troops in Afghanistan, the lowest number since operations began in 2001. This month, The New York Times reported there are 1,000 more service members than the U.S. has disclosed, citing European and Afghan officials.

In addition to the U.S. forces, 35 other NATO member states have a total of more than 7,000 personnel in Afghanistan, with the largest numbers from Germany, Italy and the United Kingdom, according to NATO figures published in February.

The Afghan government and the Taliban started talks to end decades of war in September, but the process has been halting. Representatives from both sides said they were ready to accelerate the talks, but the Taliban insisted the agreed deadline for withdrawal be met, according to Reuters.

NATO Secretary-General Jens Stoltenberg said last month that the military alliance will leave when the time is right. "The main issue is that Taliban has to reduce violence, Taliban has to negotiate in good faith and Taliban has to stop supporting international terrorist groups like al-Qaida," Stoltenberg said.

Copyright 2021 NPR. To see more, visit https://www.npr.org.