after the 1979 soviet invasion and revolution , 3 million afghans defected to pakistan , which was encouraged by windfall iranian aid to take them in .
Afghanistan was invaded by the Soviet Union in 1979.