To extend the first answer you received, let me add:
... while the US military "intelligence" complex intentionally funneled massive resources to radical Islamists in Afghanistan, in order to grow radical Islamism, as a proxy to cause troubles for the Soviet Union.
Read The Grand Chessboard by Brzezinski, who famously publicly rejected any second thoughts about that strategy, insisting that the strategic goal of disrupting the Soviet Union far outweighs any trouble the world might now have with radical Islamism. A pair of quotes:
"Regret what? That secret operation was an excellent idea. It had the effect of drawing the Russians into the Afghan trap and you want me to regret it? The day that the Soviets officially crossed the border, I wrote to President Carter. We now have the opportunity of giving to the USSR its Vietnam war. Indeed, for almost 10 years, Moscow had to carry on a war unsupportable by the government, a conflict that brought about the demoralization and finally the breakup of the Soviet empire."
Interview with Le Nouvel Observateur, Paris, 15-21 January 1998 (When asked if he regretted drawing the Soviets into a trap in Afghanistan)
"What is most important to the history of the world? The Taliban or the collapse of the Soviet empire? Some stirred-up Moslems or the liberation of Central Europe and the end of the cold war?"
Interview with Le Nouvel Observateur, Paris, 15-21 January 1998 (When asked if he regretted contributing to the rise in Islamic fundamentalism)