- War in Afghanistan (2001-present)
image sourceReutersimage captionPeople have been sleeping on the streets in Kabul and in makeshift camps after fleeing their homes
Afghan President Ashraf Ghani has flown to Mazar-i-Sharif to rally pro-government forces as Taliban militants close in on the northern city.
Mazar-i-Sharif has long been an anti-Taliban bastion, and its fall would be catastrophic for the government.
In nearby Kunduz, hundreds of government soldiers have surrendered to the militants at the city's airport.
The insurgents now control nine of the country's 34 provincial capitals, seizing three of them within 24 hours.
US President Joe Biden said on Tuesday that he did not regret withdrawing troops from Afghanistan after 20 years, urging Afghan leaders to unite and "fight for their nation".
He insisted the US was keeping the commitments it had made to Afghanistan, such as providing close air support, paying military salaries and supplying government forces with equipment and food.
A US-led military campaign began in 2001 following the 9/11 attacks on American soil – but now most of the foreign troops have pulled out.
- EXPLAINER: Why is there a war in Afghanistan?
- ANALYSIS: How the Taliban retook half of Afghanistan
- PROFILE: Who are the Taliban?
On Wednesday, President Ghani held crisis talks in Mazar-i-Sharif with ethnic Uzbek warlord Abdul Rashid Dostum and prominent ethnic Tajik leader Atta Mohammad Noor about defending the city.
Mr Dostum, a veteran commander, was quoted as saying that "the Taliban have come to the north several times but they were always trapped".
For years, Mr Ghani tried to sideline the warlords in an attempt to boost the Afghan National Army, and now he is turning to them in his hour of need, the BBC's Ethirajan Anbarasan says. Earlier this week, the president also agreed to arm pro-government militia.
image sourceReutersimage captionPresident Ashraf Ghani (centre) has tried to sideline powerful Afghan warlords to strengthen the Afghan National Army
Mazar-i-Sharif lies close to the borders with Uzbekistan and Tajikistan, and its loss would mark the complete collapse of the government's control over the north of Afghanistan.
In Kunduz, another provincial capital, hundreds of government soldiers – who had earlier retreated to the airport after the Taliban overran the city – have now surrendered.
"My unit, with 20 soldiers, three Humvees [military vehicles] and four pick-up trucks just surrendered," one commander told the AFP news agency.
Earlier in a series of rapid advances the Taliban seized three more provincial capitals – the north-western city of Faizabad, Farah in the west, and the northern city of Pul-e-Khumri.
The Washington Post newspaper has cited unnamed officials as saying the capital Kabul could fall to the Taliban within 90 days, based on US military assessments.
Heavy fighting is continuing in other parts of the country, and US and Afghan planes have been carrying out airstrikes.
Psychological blow could be huge
Analysis by Inayatulhaq Yasini, BBC Kabul bureau editor
Mazar-i-Sharif, now a major economic centre, has historically been the supply gateway from the former Soviet Union to the country.
The government in Kabul recognises the importance of the city, and that is why the Afghan president visited it to hold talks with local leaders and former warlords.
If it falls the psychological blow would be huge. The last time the Taliban took the city was in the 1990s. This happened without any heavy resistance after a deal was done with Abdul Rashid Dostum.
But now he is one of the key leaders fighting the militant group.
More than 1,000 civilians have been killed amid fierce fighting between the Taliban and government forces in the past month, according to the UN. Its children's agency Unicef warned this week that atrocities being committed against children were growing "higher by the day"..
Thousands of people have been fleeing their homes in recent days.
"We saw bodies lying near the prison… there were dogs next to them," one woman who left Kunduz told the AFP.
"People are opening their shops and businesses, but you can still see fear in their eyes," one local resident said.
The Taliban have rejected international calls for a ceasefire.
UK Chief of the Defence Staff Gen Sir Nick Carter told the BBC that if the state fractured, the "ideal conditions" could emerge for international terrorism and violent extremism.
media captionGen Sir Nick Carter: A security vacuum could lead to international terrorism