Answer:
B. the Soviet union
Step-by-step explanation:
The country that fought a war in Afghanistan before 2001 was the Soviet Union who invaded the country under the guise of upholding the Soviet-Afghan Friendship Treaty of 1978 but were really there to consolidate their power base.
They were resisted by the Mujahidin who saw the incursion by the Soviets as an insult to Islam.