The Taliban seized power in Afghanistan two weeks before the United States was set to complete its troop withdrawal.