Late on Monday, hours ahead of President Joe Biden's Tuesday deadline for shutting down a final airlift, the last US Air Force evacuation flight left Kabul airport.
General Frank McKenzie, head of US Central Command, said the last planes took off from Kabul airport at 15:29pm Washington time, or one minute before midnight in Kabul.
Watch: Who are ISIS-K?
Secretary of State Antony Blinken said the number of Americans left behind is less than 200, "likely closer to 100," and said the State Department would keep working to get them out.
The airport, which had become a US-controlled island when the Taliban took over the country, will soon be taken over by the insurgents.
He praised the military-led evacuation as heroic and historic and said the US diplomatic presence would shift to Doha, Qatar.
The airport, which had become a US-controlled island after the Taliban took over the country, will soon be taken over by the insurgents.
American troops faced the daunting task of getting final evacuees onto planes while also getting themselves and some of their equipment out, even as they monitored repeated threats.
A suicide bombing on August 26 killed 13 American service members and some 169 Afghans.
The final pull-out fulfilled Mr Biden's pledge to end what he called a "forever war" that began in response to the attacks of 11 September 2001, that killed nearly 3,000 people in New York, Washington and rural Pennsylvania.
Watch: General Sir Nick Carter – 'absolutely heartbreaking that we can't bring everybody out'.
General Kenneth McKenzie, the commander of US Central Command, told reporters that the US believes it was able to evacuate the "vast majority" of Americans in the country who wanted to leave, but that it was aware of some who were could not depart.
The Taliban proclaimed "full independence" for Afghanistan after the last US soldiers departed.
Taliban spokesman Zabihullah Mujahid said that "American soldiers left the Kabul airport, and our nation got its full independence".
The final UK evacuation flight left on Saturday, bringing an end to the UK's 20-year military involvement in Afghanistan.
More than 15,000 people have been evacuated by the UK since 14 August.
In an open letter, Prime Minister Boris Johnson said he had been "lost in admiration for the heroic efforts of everyone" involved in Operation Pitting – the codename given to the UK's evacuation effort.
Further details about support available can be found on our website.
Cover image: The last US soldier to leave Afghanistan - Major General Chris Donahue (Picture: US Department of Defense/Twitter).