BRUSSELS (AP) — NATO chief Jens Stoltenberg says the alliance has agreed to withdraw its roughly 7,000 non-American forces from Afghanistan to match U.S. President Joe Biden’s decision to pull all American troops from the country starting on May 1.

Stoltenberg said the full withdrawal would be completed “within a few months” but did not mention the 20th anniversary of the Sept. 11 terrorist attacks set as a goal by Biden. There are between 7,000 and 7,500 non-U.S. NATO troops currently in Afghanistan. The U.S. troop presence stands at roughly 2,000.

"We now have decided to start with withdrawal of all our NATO troops from Afghanistan starting the first of May," Stoltenberg said Wednesday. “We plan to complete the withdrawal of all our troops within a few months.”

“We went into Afghanistan together, we have adjusted our posture together and we are united in leaving together,” he said. He added that any attacks on withdrawing NATO forces would draw a firm and forceful response from the alliance.

Stoltenberg revealed the decision shortly after Biden formally announced his withdrawal plans and after meeting with Secretary of State Antony Blinken and Defense Secretary Lloyd Austin at NATO headquarters in Brussels.

Blinken and Austin spent the day in talks with senior officials from the alliance’s 30 members to discuss Biden's decision and NATO’s future in Afghanistan.

“This is not an easy decision, and this is a decision that contains risks and a decision that requires that we continue to stay focused on Afghanistan,” Stoltenberg said. “This is not an end, but the beginning of a new way of dealing with Afghanistan.”

In a joint news conference with Stoltenberg, Blinken and Austin both repeated the mantra that the alliance went into Afghanistan together and would leave together. But all three maintained that neither the U.S. nor NATO would abandon the country despite the impending pullout.

Austin said the United States will “look to continue funding key capabilities such as the Afghan Air Force and Special Mission Wing, and we will seek to continue paying salaries for Afghan security forces." For many years, the U.S. government has spent several billion dollars a year to support the Afghan forces.

“Bringing our troops home does not mean ending our relationship with Afghanistan or our support for the country,” Blinken said. “Our support, our engagement and our determination remain.”

Austin also said the U.S. military, after withdrawing from Afghanistan, will keep counterterrorism “capabilities” in the region to keep pressure on extremist groups operating within Afghanistan. Asked for details, he declined to elaborate on where those U.S. forces would be positioned or in what numbers.

“We have the reach and ability to do that,” Austin said when asked whether it was feasible to counter terrorist groups inside Afghanistan without U.S. troops present inside the country.

The coalition operation in Afghanistan has special resonance with NATO as its deployment marked the first time the alliance invoked its Article 5 mutual defense pact, which holds that an attack on one member is an attack on all.

Blinken and Austin said the United States would be forever grateful for the solidarity and support the alliance offered in the wake of the Sept. 11 attacks.

AP National Security Writer Robert Burns contributed to this report.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.