Objective: The objective of this study was to explore the specific factors that influence medical student's choice of primary care as a specialty. Special attention is given to the influence of desire to work in underserved communities on selection of a specialty.Design and Settings: A web-based survey of factors affecting choice of specialty was completed by 668 fourth-year students from 32 medical schools.Results: Students interested in primary care reported an increased likelihood of working with underserved populations when compared with other specialties. The independent impact of both student's social compassion attitudes and values, and subjective and reinforcing influences on the selection of primary care, when compared with all other specialties, was strong. Personal practice-oriented considerations showed an independent negative impact on the selection of primary care when compared with surgery and support specialties. Financial considerations strongly influence the selection of support specialties. Medical training experiences showed an independent influence on the selection of surgery over primary care.Conclusion: The need for primary care physicians and specialists in underserved communities is considerable. Addressing health disparities in underserved communities requires a concerted effort to increase the availability of primary care providers in these communities. This study observed that primary care practice or specialty selection by medical students is influenced by individual values and subjective external influences other than predicted by medical training alone. This observation necessitates a closer determination of strategies required to ensure an increase in the number of primary care physicians serving underserved communities.