The resignation of Rahmatullah Nabil follows a series of setbacks in recent months including the fall of the northern city of Kunduz to the Taliban and an insurgent raid on Kandahar airport in the south on Tuesday in which 50 civilians, police and security personnel were killed.