The US has completed efforts to evacuate its remaining civilians and troops from Afghanistan, effectively ending the longest war in American history, the Pentagon said Monday.

Iran press/Asia: “I’m here to announce the completion of our mission in Afghanistan,” Marine Corps General Kenneth McKenzie told reporters in a virtual briefing. "The last C-17 took off at 3:29 pm."

The departure of the last US plane from Afghanistan capped a bloody and chaotic end to the conflict. In the war's final weeks, fighting and terror attacks amid the scramble to evacuate thousands of Americans and Afghans left 13 service members and hundreds of civilians dead. The US is not expected to have any diplomatic or military presence in the country after this point, officials said.

President Joe Biden has faced some of the harshest criticism of his presidency from both Republicans and Democrats since the Taliban took control of the country on Aug. 15. But he has stood behind his decision to pull all US troops out of the country by the 20th anniversary of the Sept. 11 attacks, saying it was no longer in America's interest to keep troops on the ground in Afghanistan. Biden was meeting with advisors in the Oval Office when an aide passed a note to National Security Advisor Jake Sullivan alerting him that the last military plane had safely left Kabul and Sullivan relayed the news to the president, a White House official said.

As the US handed the country over to the very group that they began fighting 20 years earlier, Biden has no second thoughts, White House press secretary Jen Psaki said.

"The president stands by his decision to bring our men and women home from Afghanistan," Psaki said.

In a statement Monday evening Biden thanked the service members who aided in the evacuation and said he would make further remarks Tuesday.

"The past 17 days have seen our troops execute the largest airlift in US history, evacuating over 120,000 US citizens, citizens of our allies, and Afghan allies of the United States," Biden said. They have done it with unmatched courage, professionalism, and resolve. Now, our 20-year military presence in Afghanistan has ended."

Biden defended his decision to end the evacuation operation saying that it was the unanimous recommendation of the Joint Chiefs and all of the commanders on the ground.

"Their view was that ending our military mission was the best way to protect the lives of our troops, and secure the prospects of civilian departures for those who want to leave Afghanistan in the weeks and months ahead," Biden said in the statement.

McKenzie said more than 6,000 Americans were evacuated representing the "vast majority of those who wanted to leave at this time." He said the number of remaining Americans is in the "very low hundreds."The administration remains committed to getting all Americans and eligible Afghans who want to leave out of the country beyond the Aug. 31 deadline, shifting from a military to a diplomatic operation led by the State Department, McKenzie said.