This month the Taliban made one of its boldest attempts in taking over a provincial capital since its brief occupation of the city of Kunduz in 2016.
This time it's in Ghazni, a strategic city less than 100 miles from Afghanistan's capital, Kabul. An estimated 1,000 Taliban fighters swarmed the city before they were eventually driven out.
It was a stunning show of force by the Taliban, which has been chipping away at territory controlled by the Afghan government for years now.
So how do we go from Defense Secretary Jim Mattis saying the Taliban is on the back foot four months ago, to it overrunning a strategic city so close to the Afghan capital?
Well, despite the large size of the Afghan military — it's estimated to number around 350,000 — it's been struggling to fend off Taliban attacks and a host of other internal problems since the U.S. let it take the lead in the fight in 2014.
And U.S. forces in Afghanistan can't contribute as much as they used to. The current number of U.S. troops in the country sits somewhere around 14,000 — much lower than its peak of around 100,000 in 2009 and 2011.
The U.S. and Afghan government strategy against the Taliban has also shifted from protecting rural areas to focusing on urban centers. This has allowed the Taliban to keep its footholds in sparsely populated parts of the country — something some analysts believe is empowering the group.
According to the Foundation for the Defense of Democracy's Long War Journal, almost 200 of Afghanistan's districts are contested by the Taliban. A little under 50 are controlled by the Taliban.
Afghanistan's president, Ashraf Ghani, has been attempting to kick-start peace talks, but progress has been slow. A June cease-fire announced for the end of Ramadan held temporarily, but fighting ultimately resumed after the holiday.
After offering a similar ceasefire for August, President Ghani's Eid al-Adha holiday speech was interrupted when the Taliban fired two rockets toward the presidential palace in Kabul.