Several million Afghans fled to Iran after the Soviet invasion of Afghanistan almost 30 years ago and from subsequent fighting among Afghan factions .