Before commencing rational control programmes for AIDS in Africa it is desirable to determine the relative importance of heterosexual and various non-sexual modes of transmission. We investigated this by comparing the seroepidemiologies of AIDS, hepatitis B and syphilis at two rural hospitals in southwest Uganda. During August 1986, 3% of 357 outpatients, reflecting the age and sex composition of the general population, were anti-HIV positive. Anti-HIV seropositivity, both in the outpatients and among 36 suspected prostitutes and 14 suspected AIDS cases, was confined to individuals aged 20 or over. For men, seropositivity was associated with sexual contact with prostitutes (a risk factor for 61 % of young men in the study). In the prostitute group, 25% were anti-HIV positive and 46% were positive on the Treponema pallidum haemagglutination (TPHA) test for syphilis. The risk factors for HIV, but not hepatitis B, were the same as for having a history of sexually transmitted disease (STD). However, there was, surprisingly, an association between a history of STD and seropositivity for hepatitis B virus but not for HIV infection. The geographical and age distributions of seropositivity for HIV and hepatitis B virus were also quite different. Finally, blood transfusions, scarification and exposure to mosquitoes (as assessed by a history of malaria) were not evident risk factors for either HIV or hepatitis B virus. AIDS in rural Africa seems to differ in its epidemiology from hepatitis B and appears to be spread predominantly by pre-existing patterns of heterosexual activity responsible for high rates of other sexually transmitted diseases.