Violence has risen steadily in Afghanistan in recent years as the Taliban has fought to extend control across wide swaths of the countryside .