Around the northern city of Kunduz, despite the winter’s fierce cold, the Taliban have taken outposts and military bases, using small armed drones to terrorize Afghan troops. In neighboring Pul-i-Khumri, they have seized important highways in a stranglehold of the city, threatening main lifelines to Kabul, the country’s capital.

And in the city of Kandahar, a bedrock of historic and political importance and an economic hub for the country’s south, Taliban fighters have pummeled the surrounding districts, and moved closer to taking the provincial capital than they have in more than a decade.

The Taliban’s brazen offensive has put the Biden administration into a dangerous political bind. Under the deal struck by President Donald J. Trump with the Taliban last year, all foreign troops — including the remaining 2,500 American service members who support Afghanistan’s beleaguered army and security forces — are scheduled to withdraw by May 1, leaving the country in an especially precarious state.