The Taliban are on the brink of victory in Afghanistan after their fighters entered the capital Kabul and seized the presidential palace.
The government has collapsed, with President Ashraf Ghani fleeing abroad.
Kabul descended into chaos, as residents and foreign nationals tried to escape.
For many Afghans it was a terrifying day that marked the return of Taliban rule almost 20 years after they were ousted by a US-led coalition.
At the capital’s international airport, an eyewitness told the BBC that staff had abandoned their desks and people were running to planes.
Kabul was the last major city in Afghanistan to hold out against the Taliban offensive, which began months ago but has accelerated in the space of days.
The militants were able to seize control after most foreign troops pulled out.
US President Joe Biden has defended the withdrawal of American troops, saying he could not justify an “endless American presence in the middle of another country’s civil conflict”.
‘People are running and hiding’
The Taliban ordered their fighters to enter Kabul on Sunday, after earlier holding them back at the outskirts of the city.
They said they were going in to prevent chaos and looting after security forces left parts of the capital.
Footage broadcast by television network Al Jazeera showed fighters inside the presidential palace, brandishing guns.
A spokesman for the group later told Al Jazeera: “The war is over.”
The Taliban’s advance into Kabul came after President Ghani fled. Details of his whereabouts are not confirmed but Al Jazeera, citing a member of his staff, said he had flown to Tashkent in neighbouring Uzbekistan.
In a Facebook post addressed to Afghan citizens, Mr Ghani said he made the difficult decision to leave to avoid bloodshed in the capital city.
“The Taliban won victory in the judgment of sword and gun and they have responsibility to protect the honour, prosperity and self-respect of our compatriots,” he said.
The president was criticised by other officials for leaving.
“God will hold him accountable and the nation will also judge,” said Abdullah Abdullah, chairman of Afghanistan’s High Council for National Reconciliation.

There was panic in Kabul as the Taliban drew closer to victory. Residents headed for the airport, abandoning cars and making their way on foot in a desperate bid to get out of the country.
One 22-year-old student told the BBC that he had walked for more than five hours.
“My feet hurt, they have blisters and I’m finding it difficult to stand,” he said.
“Now that I’m leaving, I think about my family – they don’t have any way to escape. I don’t see a future.”

The US embassy said there were reports of gunfire at Kabul’s airport, and warned its citizens to take shelter as “the security situation… is changing quickly”.
In the city centre, large queues formed at banks throughout the day as people sought to withdraw cash.
Local MP Farzana Kocha told the BBC that people did not know what to do, with some running away or hiding in houses.
There were reports of fighting and injuries in the city’s Qarabagh district.
Taliban spokesman Suhail Shaheen told the BBC that people in Kabul had no need to worry and that their properties and lives were safe.
“We are the servants of the people and of this country,” he said.