KABUL - The Taliban declared the war in Afghanistan over after taking control of the presidential palace in Kabul while Western nations scrambled on Monday to evacuate their citizens amid chaos at the airport as frantic Afghans searched for a way out.

President Ashraf Ghani fled the country on Sunday as the Islamist militants entered the capital virtually unopposed, saying he wanted to avoid bloodshed, while hundreds of Afghans desperate to leave flooded Kabul airport.

"Today is a great day for the Afghan people and the mujahideen. They have witnessed the fruits of their efforts and their sacrifices for 20 years," Mohammad Naeem, the spokesman for the Taliban's political office, told Al Jazeera TV.

"Thanks to God, the war is over in the country."

It took the Taliban just over a week to seize control of the country after a lightning sweep that ended in Kabul as government forces, trained for years and equipped by the United States and others at a cost of billions of dollars, melted away.

Al Jazeera broadcast footage of what it said were Taliban commanders in the presidential palace with dozens of armed fighters.

Naeem said the form of the new regime in Afghanistan would be made clear soon, adding the Taliban did not want to live in isolation and calling for peaceful international relations.

"We have reached what we were seeking, which is the freedom of our country and the independence of our people," he said. "We will not allow anyone to use our lands to target anyone, and we do not want to harm others."

A Taliban leader told Reuters the insurgents were regrouping from different provinces, and would wait until foreign forces had left before creating a new governance structure.

The leader, who requested anonymity, said Taliban fighters had been "ordered to allow Afghans to resume daily activities and do nothing to scare civilians".

"Normal life will continue in a much better way, that's all I can say for now," he told Reuters in a message.

Central Kabul streets were largely deserted early on a sunny Monday as waking residents pondered their future.

"I'm in a complete state of shock," said Sherzad Karim Stanekzai, who spent the night in his carpet shop to guard it. "I know there will be no foreigners, no international people who will now come to Kabul."

The militants sought to project a more moderate face, promising to respect women's rights and protect both foreigners and Afghans.

New Zealand Prime Minister Jacinda Ardern called for the Taliban to uphold human rights and said the world was watching: "It's going to be all about the actions, not the words."

SHAME

A U.S. State Department spokesperson said early on Monday that all embassy personnel, including Ambassador Ross Wilson, had been transferred to Kabul airport, mostly by helicopter, to await evacuation and the American flag had been lowered and removed from the embassy compound.

Hundreds of Afghans invaded the airport's runways in the dark, pulling luggage and jostling for a place on one of the last commercial flights to leave before U.S. forces took over air traffic control on Sunday.

"This is our airport but we are seeing diplomats being evacuated while we wait in complete uncertainty," said Rakhshanda Jilali, a human rights activist who was trying to get to Pakistan, told Reuters in a message from the airport.

U.S. forces managing the airport fired into the air to stop Afghans surging onto the tarmac to try to board a military flight, a U.S. official said.

Dozens of men tried to clamber up onto an overhead departure gangway to board a plane while hundreds of others milled about, a video posted on social media showed.

The Pentagon on Sunday authorized another 1,000 troops to help evacuate U.S. citizens and Afghans who worked for them, expanding its security presence on the ground to almost 6,000 troops within the next 48 hours. 

More than 60 western countries, including the United States, Britain, France and Japan, issued a joint statement saying all Afghans and international citizens who wanted to leave must be allowed to do so.

Western nations, including France, Germany and New Zealand said they were working to get citizens as well as some Afghan employees out. Russia said it saw no need to evacuate its embassy for the time being while Turkey said its embassy would continue operations.

In a Facebook post, Ghani said he had left the country to avoid clashes with the Taliban that would endanger millions of Kabul residents. Some social media users branded Ghani, who did not disclose his location, a coward for leaving them in chaos.

'FAILED EXPERIENCE'

Many Afghans fear the Taliban will return to past harsh practices in their imposition of sharia religious law. During their 1996-2001 rule, women could not work and punishments such as stoning, whipping and hanging were administered.

U.N. Secretary-General Antonio Guterres urged all parties to exercise the utmost restraint, and expressed particular concern about the future of women and girls. 

In Washington, opponents of President Joe Biden's decision to end America's longest war, launched after the Sept. 11, 2001, attacks, said the chaos was caused by a failure of leadership.

Biden has faced rising domestic criticism after sticking to a plan, initiated by his Republican predecessor, Donald Trump, to end the U.S. military mission by Aug. 31.

Senate Republican leader Mitch McConnell blamed Biden for what he called a "shameful failure of American leadership".

"Terrorists and major competitors like China are watching the embarrassment of a superpower laid low," McConnell said.

Naeem said the Taliban would adopt an international policy of two-way non-interference. "We do not think that foreign forces will repeat their failed experience."

(Reporting by Kabul and Washington bureaus; Writing by Andrew Cawthorne, Philippa Fletcher, Daniel Wallis and Jane Wardell; Editing by Peter Cooney & Simon Cameron-Moore)