The authors developed baseline data on specialty selection and success in obtaining residency positions for the medical school graduates of 1987 who participated in the National Resident Matching Program (NRMP), compared by gender and race-ethnicity. They focused on primary care specialties and obstetrics-gynecology versus all other specialties, and sought to identify group differences in (1) patterns of specialty preference, (2) evolution of specialty choice from before to after medical school, (3) success in attaining the first choice of specialty through the NRMP, and (4) patterns in switching from an alternate specialty (ranked second or lower) to the first-choice specialty between the first and second years of residency training. The results showed substantial intergroup and intragroup variations, both before and after medical school, for family practice, internal medicine, and obstetrics-gynecology. Examination of NRMP outcomes revealed that the underrepresented-minority (URM) graduates, particularly men, were less successful both in achieving any match and in matching to their first-choice specialties. Analyses of patterns in switching specialties revealed several important facts about those who were matched to alternate specialties: (1) over half entered their first-choice specialties in the second year; (2) women had more success in switching to their first-choice specialties than did men, particularly among the URMs; (3) among those who received alternate specialties, the URM women were more likely than the URM men to leave graduate medical education by the second year (reversing the trend for the other groups); and (4) individuals whose alternate specialties were in primary care were much less likely to switch to their first-choice specialties.