The causal agent of Kaposi's sarcoma is unknown. That the disorder is ten times more common in homosexual or bisexual men with the acquired immunodeficiency syndrome (AIDS) than in other human immunodeficiency virus (HIV) transmission groups suggests that a certain aspect of their behaviour exposes them to the agent or facilitates its spread. We therefore assessed social and demographic characteristics, including sexual behaviour, of 65 homosexual or bisexual men with AIDS from London. Sexual practices in which there was contact with partner's faeces before AIDS developed were the main determinants of Kaposi's sarcoma risk. Risk increased with frequency of insertive "rimming" (oral-anal contact): Kaposi's sarcoma developed in 18% of the men with AIDS who reported never having practised insertive rimming compared with 50% who practised it less than once a month, 73% between once a week and once a month, and 75% or more once a week (two-sided exact p-value for trend less than 0.001). 45 men had been interviewed about their sexual practices before AIDS developed, and 20 were interviewed at the time the syndrome developed. The findings were similar and statistically significant when each group was analysed separately. The men with Kaposi's sarcoma also tended to be more sexually active and were more likely to engage in other sexual activities that entailed contact with faeces than were the men who had other features of AIDS only. Other behaviours and exposures, including the use of "poppers" (nitrite inhalants), were not related to Kaposi's sarcoma risk, after taking into account whether the subjects had practised insertive rimming. The data suggest that faecal-oral contact is the main route of transmission of the agent of Kaposi's sarcoma in homosexual or bisexual men with AIDS.