President Joe Biden said he will begin withdrawing US troops from Afghanistan on May 1 to end America's longest war.
In a White House speech, Biden acknowledged that US objectives in Afghanistan had become "increasingly unclear" over the past decade. He set a deadline for withdrawing all 2,500 US troops remaining in Afghanistan by September 11, exactly 20 years after al Qaeda's attacks on the United States that triggered the war.
But by pulling out without a clear victory, the United States opens itself to criticism that a withdrawal represents a de facto admission of failure for American military strategy.
"It was never meant to be a multi-generational undertaking. We were attacked. We went to war with clear goals. We achieved those objectives," Biden said, noting that al Qaeda leader Osama bin Laden was killed by American forces in 2011 and saying that organisation has been "degraded" in Afghanistan.
"And it's time to end the forever war," he added.
The war has cost the lives of 2,448 American service members and consumed an estimated $2 trillion.
US troop numbers in Afghanistan peaked at more than 100,000 in 2011.
The Democratic president had faced a May 1 withdrawal deadline, set by his Republican predecessor Donald Trump, who tried but failed to pull the troops out before leaving office in January. Instead, Biden said the final withdrawal would start on May 1 and end by September 11.
In withdrawing, Biden is embracing risks at the start of his presidency that proved too great for his predecessors, including that al Qaeda might reconstitute itself or that the Taliban insurgency might topple the US-backed government in Kabul.
"I am now the fourth American president to preside over an American troop presence in Afghanistan. Two Republicans. Two Democrats," Biden said. "I will not pass this responsibility on to a fifth."
Meeting NATO officials in Brussels, Secretary of State Antony Blinken said foreign troops under NATO command in Afghanistan will leave in coordination with the US withdrawal by September 11, after Germany said it would match American plans.
Blinken also spoke by phone with Pakistan's army chief on Wednesday and discussed the peace process, the media wing of Pakistan's military said.
Afghan President Ashraf Ghani wrote on Twitter that he spoke with Biden and respects the US decision. Ghani added that "we will work with our US partners to ensure a smooth transition" and "we will continue to work with our US/NATO partners in the ongoing peace efforts".
A conference is planned on Afghanistan starting on April 24 in Istanbul that would include the United Nations and Qatar.
The Taliban, ousted from power in 2001 by US-led forces, said they would not take part in any meetings involving decisions about Afghanistan until all foreign forces have left. Taliban spokesman Zabihullah Mujahid on Wednesday called on the United States to adhere to the deal the group reached with Trump's administration.
"If the agreement is committed to, the remaining problems will also be solved," Mujahid wrote on Twitter. "If the agreement is not committed to... the problems will certainly increase."
Biden rejected the idea that US troops could provide the leverage needed for peace, saying: "We gave that argument a decade. It has never proven effective.
"American troops shouldn't be used as a bargaining chip between warring parties in other countries."
Biden also said the threat of terrorism was not limited to a single country and that leaving American forces in one foreign land at great financial cost does not make sense.
The president made the decision personal, invoking the memory of his late son who served in Iraq and showing a card he carried with the number of US troops killed and wounded in Afghanistan. Visiting Arlington National Cemetery in Virginia, Biden later said the decision to withdraw was not hard.
"To me, it was absolutely clear," Biden said.
In Afghanistan's capital of Kabul, officials said they would carry on with peace talks and their forces defending the country.
"Now that there is an announcement on foreign troops withdrawal within several months, we need to find a way to coexist," said Abdullah Abdullah, a top peace official and former presidential candidate. "We believe that there is no winner in Afghan conflicts and we hope the Taliban realise that too."
US officials can claim to have removed al Qaeda's core leadership in the region years ago, including killing bin Laden in neighbouring Pakistan in 2011. But ties between the Taliban and al Qaeda elements persist and peace and security remain elusive.
Senator Lindsey Graham, a Republican, was among Biden's fiercest critics, saying the withdrawal would backfire by prolonging the conflict and possibly even breathing new life into al Qaeda.
"What do we lose by pulling out? We lose that insurance policy against another 9/11," Graham said.
Still, critics of the US military involvement say it clearly failed to get the Taliban to end the conflict on America's terms. Some experts blame endemic corruption in Afghanistan, Taliban safe havens across the border in Pakistan and overly ambitious goals for training Afghan security forces.
Biden criticised past US aspirations to somehow unify Afghans, a goal that defied the lessons of history over centuries.
"It’s never been done," Biden said.