* Celebratory gunfire erupts over Afghan capital

* Scores of American civilians left behind

* Taliban beat women in street with sticks -witness

Aug 31 (Reuters) -- The Taliban celebrated their victory over the United States on Tuesday, firing guns into the air, parading coffins draped in U.S. and NATO flags and setting about enforcing their rule after the last U.S. troops withdrew from a shattered Afghanistan.

The Islamist militants now control more territory than when they last ruled before they were driven out in America's longest war, which took the lives of nearly 2,500 U.S. troops and an estimated 240,000 Afghans, and cost some $2 trillion.

"We are proud of these moments, that we liberated our country from a great power," Taliban spokesman Zabihullah Mujahid said at Kabul airport after a C-17 aircraft took the last troops out a minute before midnight, ending a hasty and humiliating exit for Washington and its NATO allies.

An image from the Pentagon taken with night-vision optics showed the last U.S. soldier to step aboard the final evacuation flight out of Kabul - Major General Chris Donahue, commander of the 82nd Airborne Division.

The U.S. invasion in 2001 drove the Taliban from power and stopped Afghanistan being used by al Qaeda as a base to attack the United States.

The Taliban enacted their own, strict interpretation of Islamic law from 1996 to 2001, not least by oppressing women, and the world is watching now to see if the movement will form a more moderate and inclusive government in the months ahead.

There was a mixture of triumph and elation on the one side as the Taliban celebrated their victory, and fear on the other.

While crowds lined the streets of the eastern city of Khost for a fake funeral with coffins draped with Western flags, long lines formed in Kabul outside banks shuttered since the fall of the capital.

"I had to go to the bank with my mother but when I went, the Taliban (were) beating women with sticks,” said a 22-year-old woman who spoke on condition of anonymity because she feared for her safety.

She said the attack occurred among a crowd outside a branch of the Azizi Bank next to the Kabul Star Hotel in the center of the capital. "It’s the first time I’ve seen something like that and it really frightened me."

Destruction from recent fighting, divisions among its people and a hiatus in administration and the foreign aid on which many Afghans depend has left the country in a precarious state.

Thousands of Afghans have already fled the country, fearing Taliban reprisals.

The U.S. Senate passed legislation to provide aid to Americans returning from Afghanistan and European Union countries proposed to step up assistance to Afghanistan and its neighbors. But the EU's 27 member countries could not agree a common policy on accepting asylum-seekers.

European Home Affairs Commissioner Ylva Johansson said the bloc should take in Afghan women, children, judges, journalists and human rights activists now vulnerable to the Taliban after 20 years of greater rights and freedoms.

More than 123,000 people were evacuated from Kabul in a massive but chaotic airlift by the United States and its allies over the past two weeks, but many of those who helped Western nations during the war were left behind.

A contingent of Americans, estimated by U.S. Secretary of State Antony Blinken at fewer than 200, and possibly closer to 100, wanted to leave but were unable to get on the last flights.


General Frank McKenzie, commander of the U.S. Central Command, told a Pentagon briefing that leaving people had been heartbreaking. "But I think if we'd stayed another 10 days, we wouldn't have gotten everybody out," he said.

The departing U.S. troops destroyed more than 70 aircraft and dozens of armored vehicles. They also disabled air defenses that had thwarted an attempted Islamic State rocket attack on the eve of their departure.

As the Taliban watched U.S. troops leave Kabul on Monday night, at least seven of their fighters were killed in clashes in the Panjshir valley north of the capital, two members of the main anti-Taliban opposition group said.

Several thousand anti-Taliban fighters, from local militias as well as remnants of army and special forces units, have gathered in the valley under the command of regional leader Ahmad Massoud.

Pentagon spokesman John Kirby said the U.S. military was not concerned with images of Taliban members walking through Kabul airport holding weapons and sizing up U.S. helicopters, telling CNN they could inspect all they wanted but could not fly them.

"The threat environment," however, remains high, he said.

"We're obviously concerned about the potential for Taliban retribution going forward and we certainly, we saw it ourselves, are mindful of the threat that ISIS-K continues to pose inside Afghanistan."

ISIS-K is the Islamic State affiliate that claimed responsibility for a suicide bombing outside Kabul airport on Thursday that killed 13 U.S. service members and scores of Afghan civilians.

U.S. President Joe Biden defended his decision to stick to Tuesday's withdrawal deadline. He said the world would hold the Taliban to their commitment to allow safe passage for those wanting to leave Afghanistan.

Biden has said the United States long ago achieved the objectives it set in 2001, when it toppled the Taliban for harboring al Qaeda militants who masterminded the Sept. 11 attacks.

But he has drawn heavy criticism from Republicans and some fellow Democrats for his actions since the Taliban took over Kabul this month after a lightning advance and the collapse of the U.S.-backed government.

Blinken said the United States was prepared to work with the new Taliban government if it did not carry out reprisals against opponents.

Taliban spokesman Mujahid said the group wanted to establish diplomatic relations with the United States, despite the two decades of hostility. "The Islamic Emirate wants to have good diplomatic relations with the whole world," he said.