BY: LUIS MARTINEZ AND MATT SEYLER, ABC NEWS

(WASHINGTON) — Defense Secretary Lloyd Austin made an unannounced visit to Afghanistan on Sunday as a May 1 deadline looms for the possible withdrawal of all U.S. troops from the country. The deadline was part of last year’s peace agreement with the Taliban.

President Joe Biden has not yet decided whether to pull out the 2,500 U.S. troops and is considering whether they should remain in Afghanistan for another six months, according to a U.S. official.

In his first visit to Afghanistan as defense secretary, Austin met with Afghan President Ashraf Ghani and with Gen. Scott Miller, the top U.S. commander in Afghanistan.

Austin’s visit was carried out under tight security restrictions and reporters accompanying Austin were asked not to report the visit until after he had left the country.

The visit comes as Biden has to decide soon whether all American troops will leave Afghanistan as laid out in the peace agreement the Trump administration reached with the Taliban last year.

In an exclusive interview earlier this week, Biden told ABC News’ George Stephanopoulos that a troop pullout “could happen, but it is tough.” If the deadline is extended, Biden added that it would not be by “a lot longer.”

“I’m in the process of making that decision now as to when they’ll leave,” Biden told Stephanopoulos. “The fact is that, that was not a very solidly negotiated deal that the president, the former president, worked out. And so we’re in consultation with our allies as well as the government, and that decision’s going to be — it’s in process now.”

Biden is still considering options presented to him by U.S. military officials that include withdrawing all U.S. troops by or close to the May 1 deadline, keeping the troops there indefinitely or keeping them there for another six months into November, according to a U.S. official.

As recently as Friday, White House officials stressed that Biden has not yet made a decision about whether to abide by the deadline set under the agreement with the Taliban.

The dilemma for Biden is that while the Taliban has stuck to the agreement and refrained from attacking U.S. military forces, it has significantly increased the number of attacks against Afghan security forces.

The Taliban’s attacks against Afghan forces are seen by observers as a way for them to get leverage in long-stalled peace talks with Ghani’s government.

“Clearly, the violence is too high right now and more progress needs to be made in the Afghan-led negotiations,” Austin told reporters in February. “So I urge all parties to choose the path towards peace. And the violence must decrease now.”

At the time Austin, also reassured NATO allies “that no matter what the outcome of our review, the United States will not undertake a hasty or disorderly withdrawal from Afghanistan that puts their forces or the alliance’s reputation at risk.”

“The United States has no obligation to meet the May timeline,” said Mick Mulroy, a former deputy assistant secretary of defense for the Middle East and an ABC News contributor, who pointed to the Taliban’s attacks as showing it is not adhering to the peace deal.

“The assessment of how many troops are needed and its duration should be based on the facts on the ground,” said Mulroy. “We would all like to see the conflict in Afghanistan end and our forces return home, but we do not want to lose everything we fought so hard to gain in the process. We should not leave only to have to return and fight to get to where we are today.”

In recent weeks, the Biden administration has tried to jump-start the peace talks by pushing for a permanent cease-fire and a power sharing agreement between the Taliban and the Afghan government.

In a letter to Ghani, that was later leaked, Secretary of State Antony Blinken laid out the initiative’s goals and warned that Biden was still considering a full troop withdrawal.

With 40 days remaining before the possible pullout date, the clock is ticking on a withdrawal plan and what it would look like in a short amount of time.

Also, while the Pentagon said the official number of American troops in Afghanistan stands at 2,500, The New York Times recently reported that there are an additional 1,000 troops consisting of counterterrorism forces and personnel on temporary orders.

In the past, Biden has favored leaving a small counterterrorism force in Afghanistan, but it remains to be seen how that can be realized if he orders a full troop withdrawal.

“ISIS has a viable footprint in eastern Afghanistan, al-Qaida operates within Afghanistan and Pakistan. If we pull all of our forces out, the remaining security vacuum will be filled by extremists, whether they be Taliban or another designated terror organization,” said Eric Oehlerich, a retired Navy SEAL and ABC News contributor.

Oehlerich favors leaving behind a mix of military and paramilitary operators who could fill roles as advisers to Afghan units trained for years by the U.S. military.

He believes those American advisers could serve as a U.S. presence that could “monitor and report on Taliban actions,” in effect providing oversight for any withdrawal agreement.

“The answer shouldn’t be all or nothing,” he cautioned. “A blended approach will help check terror organizations using Afghanistan as a safe haven, as well as hold the Taliban to their pledges.”

Copyright © 2021, ABC Audio. All rights reserved.