The resurgent Taliban have captured more territory in Afghanistan in the past two months than at any time since they were ousted from power in 2001.
The map of control in Afghanistan has been an ever-changing canvas over the past 20 years. Here we look at the fluctuations in who controls what areas.
In recent weeks, as a result of the withdrawal of US troops, the Taliban appear to have become bolder and retaken many areas from government forces.
Research by Afghanistan unit shows that the militants now have a strong presence throughout the country, including in the north and north-east and in central provinces such as Ghazni and Maidan Wardak. They are also approaching major cities such as Kunduz, Herat, Kandahar and Lashkar Gah.
By control we mean areas where administrative centers, police headquarters and all other state institutions are controlled by the Taliban.
In November 2001, the US military and its regional and NATO allies drove the Taliban from power. The group has harbored Osama bin Laden and other al-Qaeda figures linked to the 11 September 2001 attacks in the United States.
But despite the continued international presence in the region and billions of dollars in support and training for Afghan government forces, the Taliban have regrouped and gradually regained strength in remote areas.
Their main areas of influence are around their traditional strongholds in the south and southwest, and in Helmand, Kandahar, Uruzgan and Zabul provinces in the north. However, they are also found in the southern hills of Faryab province in the northwest and in the mountains of Badakhshan province in the northeast.
A 2017 study showed that the Taliban had full control in some areas. But the study also showed that they were active in many other parts of the country, carrying out weekly or monthly attacks in some areas, suggesting they were significantly stronger than previously thought.
Some 15 million people – half the population – reportedly live in areas controlled by the Taliban or where the Taliban have an open presence and regularly carry out attacks on government forces.
Are the Taliban holding firm?
Although they control more territory today than they have since 2001, the situation on the ground is unstable.
The government was forced to abandon some district administrative centres because it could not withstand Taliban pressure. Other areas were occupied by force.
Where the government has managed to reorganize its forces or mobilize local militias, it has regained some of the lost ground or fighting continues in these areas. Although most US troops left in June, some remain in Kabul, and the US Air Force has flown airstrikes against Taliban positions in recent days.
Afghan government forces mainly control towns and districts in the plains or river valleys where most of the population lives.
The areas where the Taliban are strongest are sparsely populated, many with fewer than 50 people per square kilometer.
The government says it has sent reinforcements to all major cities threatened by the Taliban and imposed a month-long night curfew over most of the country to prevent the Taliban from overrunning the cities.
Although they appear to be closing in on key cities such as Herat and Kandahar, the Taliban have not yet been able to capture any towns. However, their territorial gains have strengthened their bargaining position and also generated revenue in the form of taxes and spoils of war.
In the first half of the year, a record number of civilians were killed as a result of the conflict. The UN blames the Taliban and other anti-government elements for most of the 1,600 civilian deaths. The fighting has also forced many people to flee their homes: some 300,000 have been displaced since the beginning of the year. According to UNHCR, there has been a new wave of internal displacement in the provinces of Badakhshan, Kunduz, Balkh, Baghlan and Takhar, as the Taliban have captured large parts of rural areas.