The Taliban celebrated withdrawal of the last US troops with gunfire across Kabul as they took control of the airport before dawn on Tuesday. The withdrawal ended 20 years of war.

Videos on social media show fighters entering the airport after the last US troops took off a minute before midnight.

Explained: What does US troop withdrawal mean for Afghanistan?

Meanwhile, the US Army also shared an image, taken with night-vision optics, of the last US soldier leave Kabul. He was identified as Major General Chris Donahue, commander of the 82nd Airborne Division.

The US, Afghan government and the Taliban, earlier this year, signed an agreement and agreed to end the two-decade war.

The US lost lives of nearly 2,500 troops during these years and an estimated 240,000 Afghans also died.

In the last two weeks, the United States and its allies evacuated more than 122,000 people from Kabul. Tens of thousands of Afghans who helped Western countries and fear reprisals by the Taliban are still left in Kabul.

The Taliban took over Kabul on August 15, which led to the fall of Afghan government. Former president Ashraf Ghani fled the country and there are still thousands who are trying to flee Afghanistan.

President Joe Biden, who has been criticised in the last two weeks, defended his decision to stick to a Tuesday deadline for withdrawing US forces. He said the world would hold the Taliban to their commitment to allow safe passage for those who want to leave Afghanistan.

He said that their 20-year military presence in Afghanistan has ended. The President also thanked the military for carrying out the dangerous evacuation.

Biden has said the United States long ago achieved the objectives it set in ousting the Taliban in 2001 for harbouring al Qaeda militants who masterminded the Sept. 11 attacks on the United States.