Many Taliban and al-Qaida militants fled to Pakistan from neighboring Afghanistan after the U.S.-led invasion in Afghanistan toppled the Taliban in late 2001 .