The number of medical students entering primary care residencies continues to decrease. The association between student attitudes toward underserved populations and residency choice has received little attention even though primary care physicians see a larger proportion of underserved patients than most other specialists. We evaluated attitudes toward underserved populations in 826 medical students using a standardized survey, and used logistic regression to assess the effect of attitudes, along with other variables, on selection of a primary care residency. We compared results between two groups defined by year of entry to medical school (1993-99 and 2000-05) to determine whether associations differed by time period. Students' attitudes regarding professional responsibility toward underserved populations remained high over the study period; however, there was a statistically. significant association between positive attitudes and primary care residency in the early cohort only. This association was not found in the more recent group.