To examine how medical students' attitudes and intentions toward the treatment of persons infected with human immunodeficiency virus (HIV) changed as the students progressed through medical school. Similar 44-item self-administered questionnaires, to be completed anonymously, were given to 394 medical students at the University of Michigan Medical School in February 1989, when the students were in their first or second years, and to 378 of the same students in February 1991, when they were in their third or fourth years. Seven subscale variables were created, and their effects on students' willingness to treat HIV-infected patients were assessed. Bivariate statistics and logistic regression were used to relate the dependent and independent variables. In 1989, 201 (51%) of the students responded; in 1991, 208 (55%) responded. The students showed a high--but declining--degree of willingness to care for patients infected with HIV or at high risk of infection. Homophobic attitudes decreased, but so did the students' intentions to follow infection-control guidelines. The students who expressed a career interest in surgery specialties indicated less willingness to provide care for HIV-infected patients, presumably because these students felt that they would be at a higher risk of exposure. Overall, the students' responses indicated that over the two years of the study they became more restrictive in their attitudes toward HIV-positive patients, felt less personal obligation toward caring for these patients, and were less likely to use appropriate infection-control methods to ensure their own safety.