BACKGROUND: It is not clear why medical students choose one specialty over another. Experiences at medical school are extremely strong determinants of attitudes to the medical specialties, and attitude is the most important factor in determining choice. AIM: This study sought to describe the factors influencing career choices of final year medical students, the effect of a new four-week attachment in general practice on career choices, and changes in career choices towards or away from general practice between the final year and the end of the preregistration house officer year. METHOD: Career preferences, and influences on them, were assessed by questionnaires administered to 206 medical students undergoing their final clinical attachment at the University of Glasgow immediately before and immediately after a four-week attachment in general practice. These were followed up by a postal questionnaire at the end of the preregistration house officer year. RESULTS: One hundred and thirty-one students returned all three questionnaires. Before the attachment, students born outside the UK, and those who had a previous or intercalated degree were significantly less likely to put general practice as a career preference; female students were more likely to put it as their first career choice. After the attachment, the number stating that it was 'likely' or 'very likely' that they would choose general practice as a career increased from 60 to 72--mainly through male students changing their preference--but after the preregistration house officer year it had fallen back to 56. Seventeen of the preregistration house officers were planning to complete posts which would qualify for GP training. Reasons for changing preference towards general practice were mainly to do with a dislike of and disillusionment with hospital medicine and with the perceived lifestyle advantages of general practice. Reasons for changing preference away from general practice were mainly to do with positive feelings about hospital medicine and a dislike of the management aspects of general practice. CONCLUSION: The general practice attachment influenced students, especially males, towards a career in general practice, but this effect was transient. This cohort of doctors should be followed up in order to discover their ultimate career choices.