The top US envoy to Afghanistan is stepping down from his role less than two months after American forces withdrew from the country.
Zalmay Khalilzad led the US dialogue with the Taliban, but months of diplomatic talks failed to prevent the militant group from seizing power.
The Taliban took control in August after capturing the capital Kabul.
US Secretary of State Antony Blinken said Mr Khalilzad's deputy, Thomas West, would take over.
"I extend my gratitude for his decades of service to the American people," Mr Blinken said in a statement announcing Mr Khalilzad's resignation on Monday.
In a letter to Mr Blinken, Mr Khalilzad acknowledged that "the political arrangement between the Afghan government and the Taliban did not go forward as envisaged".
"The reasons for this are too complex and I will share my thoughts in the coming days and weeks," he wrote, saying he was stepping aside as the US entered the "new phase of our Afghanistan policy".
He added that he was "saddened" for the Afghan people given the current outcome.
Mr Khalilzad, 70, was born in Afghanistan and grew up in Kabul. He is a veteran US diplomat, holding previous positions under former presidents Donald Trump, Barack Obama and George W Bush.
He spearheaded talks with the Taliban that led to the signing of the so-called Doha Agreement in February last year, which set a date for the US to withdraw its troops from Afghanistan.
In September, US defence officials said the Taliban's takeover of Afghanistan could be traced back to that deal.
US President Joe Biden continued the plan for withdrawal, with an end date of 31 August, marking an end to a 20-year presence in the country. US forces removed the Taliban from power in 2001.
Separately on Monday, it was announced that the US state department's inspector general would review the final days of the withdrawal from Afghanistan, including the emergency evacuation of the country's embassy in Kabul.
A department spokesperson said the review would also look at the resettlement of refugees.
President Biden, a Democrat, has been criticised by his Republican opponents over the Afghan withdrawal.
The Taliban's rapid advance in August - when the militants seized control of the country within about two weeks - sparked a mass evacuation effort from the US and its allies, as thousands of people tried to flee.
A suicide attack killed more than 180 people during the operation.