KABUL, Afghanistan — Taliban fighters watched the last U.S. planes disappear into the sky over Afghanistan around midnight Monday and then fired their guns into the air, celebrating victory after a 20-year insurgency that drove the world's most powerful military out of one of the poorest countries.The departure of the U.S. cargo planes marked the end of a massive airlift in which tens of thousands of people fled Afghanistan, fearful of the return of Taliban rule after the militants took over most of the country and rolled into the capital earlier this month."The last five aircraft have left, it's over!" said Hemad Sherzad, a Taliban fighter stationed at Kabul's international airport. "I cannot express my happiness in words. ... Our 20 years of sacrifice worked."In Washington, Gen. Frank McKenzie, head of U.S. Central Command, announced the completion of America's longest war and the evacuation effort, saying the last planes took off from Kabul airport at 3:29 p.m. EDT — one minute before midnight Monday in Kabul."We did not get everybody out that we wanted to get out," he said.With its last troops gone, the U.S. ended its 20-year war with the Taliban back in power. Many Afghans remain fearful of their rule or of further instability, and there have been sporadic reports of killings and other abuses in areas under Taliban control despite the group's pledges to restore peace and security."American soldiers left the Kabul airport, and our nation got its full independence," Taliban spokesman Zabihullah Mujahid said early Tuesday.The U.S. and its allies invaded Afghanistan shortly after the Sept. 11, 2001, terror attack on the United States, which al-Qaida orchestrated while sheltering under Taliban rule. The invasion drove the Taliban from power in a matter of weeks and scattered Osama bin Laden and other top al-Qaida leaders.The U.S. and its allies launched an ambitious effort to rebuild Afghanistan after decades of war, investing billions of dollars in a Western-style government and security forces. Women, who had been largely confined to their homes under the Taliban's hard-line rule, benefited from access to education and came to assume prominent roles in public life.But the Taliban never went away.In the coming years, as the U.S. focused on another troubled war in Iraq and the Afghan government became mired in corruption, the Taliban regrouped in the countryside and in neighboring Pakistan. In recent years, they seized large parts of rural Afghanistan and carried out near-daily assaults on Afghan security forces.Eager to end the war, the Trump administration signed a peace deal with the Taliban in February 2020 that paved the way for the withdrawal. President Joe Biden extended the deadline from May to August and continued with the pullout despite the Taliban's rapid blitz across the country earlier this month.Now the Taliban control all of Afghanistan except for the mountainous Panjshir province, where a few thousand local fighters and remnants of Afghanistan's collapsed security forces have pledged to resist them. The Taliban say they are seeking a peaceful resolution there.They face much graver challenges now that they govern one of the poorest and most war-ravaged nations on Earth.In recent days Afghans have lined up outside banks as an economic crisis that predates the Taliban takeover worsens. A string of attacks by the Islamic State extremist group's local affiliate, including a barrage of rockets fired at the airport Monday, shows the security challenges the Taliban face. On Thursday, an Islamic State suicide attack at an airport gate killed at least 169 Afghans and 13 U.S. service members. The extremist group is far more radical than the Taliban, and the two groups have fought each other before. The Taliban say they will prevent Afghanistan from again being used as a base for terror attacks, a pledge that will likely be tested soon.McKenzie said the Taliban were "significantly helpful" in enabling the airlift but will have difficulty securing Kabul in the coming days, not least because of the threat they face from IS. He said the Taliban had freed IS fighters from prisons, swelling their ranks to an estimated 2,000."Now they are going to be able to reap what they sowed," the American general said.Many Afghans fear the Taliban themselves, who governed the country under a harsh interpretation of Islamic law from 1996 until 2001. In those years they banned television and music, barred women from attending school or working outside the home, and carried out public executions.The Taliban have sought to project a more moderate image since the takeover. They say women will be able to attend school and work, and have renounced any revenge attacks on Afghans who worked with the former government, the U.S. or its allies.Many Afghans are deeply skeptical of such promises, and fear of the Taliban's rule drove tens of thousands to flee the country over the past two weeks. Thousands more waited in vain outside the airport, many of them standing for hours in a sewage canal. The Kabul international airport had been one of the few ways out. At one point people flooded onto the tarmac and seven fell to their deaths after clinging to a plane that was taking off. Another seven died in a stampede of people outside an airport gate.The Taliban have said they will allow normal travel, but it is unclear how they will run the airport and which commercial carriers will begin flying in, given security concerns.Qatar, a close U.S. ally that has long hosted a Taliban political office, has been taking part in negotiations about operations at the airport with Afghan and international parties, mainly the U.S. and Turkey. Qatari Assistant Foreign Minister Lolwa al-Khater said its main priority is restoring regular operations while maintaining security at the airport.The last known U.S. military operation in Afghanistan came Sunday, when American officials said a drone strike blew up a vehicle carrying IS suicide bombers who were planning to attack the airport. But like so much about the Afghanistan war, it may not have gone as planned.Relatives of those killed in Sunday's strike said it killed civilians who had nothing to do with the extremist group. Najibullah Ismailzada said his brother-in-law, Zemarai Ahmadi, had just arrived home from his job working with a Korean charity. As he drove into the garage, his children came out to greet him, and that is when the missile struck."We lost 10 members of our family," Ismailzada said, including six children raging in age from 2 to 8. He said another relative, Naser Nejrabi, who was a former soldier in the Afghan army and a former interpreter for the U.S. military, also was killed, along with two teenagers.U.S. officials have acknowledged the reports of civilian casualties without confirming them.Hours before the withdrawal was complete, White House press secretary Jen Psaki said the U.S. military takes steps to avoid civilian casualties when carrying out targeted strikes. "Of course, the loss of life from anywhere is horrible, and it impacts families no matter where they're living, in the United States or around the world," she said. Copyright 2021 NPR. To see more, visit https://www.npr.org.