To elucidate the importance of environmental and genetic factors in prostate cancer etiology, we compared the risk of prostate cancer among foreign-born men to that of Swedish-born men in Sweden and to that in the country of origin. We estimated rate ratios (RRs) with 95% confidence intervals (CIs) adjusted for age, calendar period of year and education using Poisson regression in a cohort of 3.8 million men aged 45 years and older between 1961 and 2004. During the 45 years of follow-up, 8,244 and 187,675 cases of prostate cancer occurred among foreign-born and Swedish-born men, respectively. Overall, foreign-born men had a significantly 40% decreased risk of prostate cancer compared to Swedish-born men (RR = 0.62, 95% CI = 0.61-0.63). Men born in Middle Africa and in the Caribbean had an increased risk (RR = 1.89, 95% CI = 0.95-3.78 and RR = 1.24, 95% CI = 0.71-2.19, respectively). The overall risk in both strata of duration of residence or age at immigration was lower among immigrants compared to Swedish-born men. After additional adjustment for birthplace and age at immigration, although the risk remained lower among immigrants compared to Swedish-born, but it was increased among immigrants who stayed 35 years and longer compared to those who stayed shorter (RR = 1.33, 95% CI = 1.21-1.46). Both environmental and genetic factors seem to be involved in the etiology of prostate cancer. Duration of residence was an important factor affecting the risk among immigrants. Studies focusing on the etiology of prostate cancer specifically in African immigrants and their descendants and increasing preventive and diagnostic activities on old immigrants are recommended.