President Joe Biden has decided to withdraw most of the remaining U.S. troops in Afghanistan before the 20th anniversary of the terrorist attacks that began the war on terrorism, a senior administration official said Tuesday.

The withdrawal will begin before May 1 — the original deadline set by former President Donald Trump for all U.S. troops to leave Afghanistan under an agreement with the Taliban — and it could be completed well before September, said the official, who spoke to reporters on condition of anonymity.

According to the official, the end of the U.S. military’s presence in Afghanistan will no longer be tied to conditions on the ground because Biden determined that the conditions-based approach of the past two decades would only ensure that troops remained in the country indefinitely. The supposed end date will mark 19 years and 11 months since the beginning of Operation Enduring Freedom, which later became Resolute Support and Freedom’s Sentinel.

The U.S. government has let the Taliban know that U.S. and partner nations will forcefully respond to any attacks on their forces as they leave Afghanistan, said the official said, who added that at the end of the withdrawal, the only remaining U.S. troops will be assigned to protecting American diplomats in Afghanistan.

Biden’s decision comes as the Taliban have the initiative in their war against the Afghan government. Afghan security forces are in retreat and they are not expected to hold together long after the U.S. military’s exit.

Nevertheless, Biden believes that the United States can effectively counter the threat of terrorism emanating from Afghanistan without having troops on the ground fighting the Taliban, the official said.

Moreover, it has been several years since the United States achieved its initial objectives for invading Afghanistan — bringing the terrorists behind the Sept. 11 attacks to justice and preventing Afghanistan from being used as a safe haven for terrorists who wanted to attack the homeland, the official said.

The U.S. government believes that the members of Al Qaeda in Afghanistan are capable of launching attacks against the homeland, unlike terrorist groups in other countries such as Yemen and Somalia, the official said.

But the United States needs to focus its energy on other challenges, such as competition with China, and that requires ending the 20-year war in Afghanistan, the official said.

Biden’s decision to carry through with the troop withdrawal – which had been agreed to in principle under former President Donald Trump’s administration – was met with criticism by Republicans in Congress.

Sen. Jim Inhofe (R-Okla.), the former chairman of the Senate Armed Services Committee, called Biden’s decision to withdraw U.S. troops from Afghanistan “reckless” and “dangerous,” arguing that the end of the military presence in the country must be based on conditions on the ground.

But when Inhofe was chairman of the committee, he was mostly supportive of Trump’s decisions regarding Afghanistan and he offered his tepid endorsement of the most recent drawdown.

But Trump long ago abandoned the pretense that the U.S. military’s exit from Afghanistan had anything to do with security there when he repeatedly slashed the number of service members in the country and at one point tweeted that all the troops would be home by Christmas.