The USSR was also affected by its failure. They lost fifteen thousand troops, but the true damage done was in its image, and the billions of dollars it spent during the war. This defeat and vast expenditure of money, partly caused the USSR to fall apart in the early 1990s.
One long-term effect of the Soviet invasion and the withdrawal of the troops was that it leads to the establishment of a breeding ground for terrorism. The US provided the resistance with guns and antiaircraft missiles which now they face, even if it seemed like a good idea at that time. Even the United States felt its effects.
create a settlement. Pakistan did this by creating the Taliban and helping it to take over the country. The Taliban, proved welcoming hosts for former mujaheddin Osama bin Laden, who brought his followers to Pakistan. The result of the Soviet invasion, war and years of neglect that followed lead to the attacks of 9/11 and many terrorists attacks all over the world.