CHAHAR DARA, Afghanistan — The last time Afghans in the northern province of Kunduz felt so threatened by the Taliban was in 2009, just before President Obama deployed thousands of troops to push the insurgents back from the outskirts of the province’s capital.

Now the Taliban are back, but the cavalry will not be coming.

With just two months left before the formal end of the 13-year international combat mission, Western officials insist that the Afghan security forces have managed to contain the Taliban’s offensives on their own. But the insurgents’ alarming gains in Kunduz in recent weeks present a different picture.

In an area that has not been a primary front against the Taliban for years, there are now two districts almost entirely under Taliban rule, local officials say. The Taliban are administering legal cases and schools, and even allowing international aid operations to work there, the officials say.

The new Afghan government under President Ashraf Ghani has acknowledged the depth of the crisis, telling local officials in a videoconference that Kunduz’s situation was a priority on a par with major battle fronts in the Taliban-heavy south and east this year. Already, troop reinforcements have been sent from Mazar-i-Sharif, the main city in the north.