To investigate the epidemiology and normal course of infection with HIV the prevalence and incidence of the infection were studied among two cohorts of homosexual men in Amsterdam in 1980-7. The cumulative incidence of infection increased from a weighted 2.2% in 1980 to 39.0% in 1987. The estimated yearly incidence of HIV was 3.0% in 1981, rose to 8.8% in 1984, and fell gradually to 0% in 1987. During the study the sexual behaviour of the cohorts was examined. The number of men with whom anopenetrative intercourse was practised fell from a mean of 10.6 to 1.4 for those positive for HIV antibody, whereas the number with whom anoreceptive intercourse was practised fell from a mean of 3.7 to 0.5 for those negative for the antibody. In addition, there was a reduction in the number of cases of hepatitis B and syphilis among men in general. The decline in infection with HIV was assumed to be linked to changes in sexual behaviour. Such changes practised early in the course of the epidemic probably had a strong effect on the number of cases of AIDS among homosexual men in Amsterdam.