Uganda offers a unique setting in which to study the effect of human immunodeficiency virus-1 (HIV-1) on cancer. HIV-1 is prevalent there, and cancers which are known to be HIV-associated, such as Kaposi's sarcoma and Burkitt's lymphoma, are endemic. Adults residing in Kampala, Uganda, presenting with cancer in city hospitals were interviewed and had an HIV test. Of the 302 adults recruited, 190 had cancers with a potentially infectious aetiology (cases). The remaining 112 adults with tumours not known to have an infectious aetiology formed the control group. In addition, 318 children who were also Kampala residents were recruited and tested for HIV: 128 with cancer (cases) and 190 with non-malignant conditions (controls). HIV seroprevalence was 24% in adult controls and 6% in childhood controls. The odds of HIV seropositivity among cases with specific cancers (other than Kaposi's sarcoma in adults) were compared with that among controls, using odds ratios (ORs), estimated with unconditional logistic regression. All ORs were adjusted for age (<5, 5–14, 15–19, 30–44, 45+) and sex and, in adults, also for the number of lifetime sexual partners (1 or 2, 3–9, 10+). In adults, HIV infection was associated with a significantly (p < 0.05) increased risk of non-Hodgkin's lymphoma [OR = 6.2, 95% confidence interval (CI) 1.9–19.9, based on 21 cases] and conjunctival squamous-cell carcinoma (OR = 10.9, 95% CI 3.1–37.7, based on 22 cases) but not with cancer at other common sites, including liver and uterine cervix. In children, HIV infection was associated with a significantly increased risk of Kaposi's sarcoma (OR = 94.9, 95% CI 28.5–315.3, based on 36 cases) and Burkitt's lymphoma (OR = 7.5, 95% CI 2.8–20.1, based on 33 cases) but not with other cancers. The pattern of HIV-associated cancers in Uganda is broadly similar to that described elsewhere, but the relative frequency of specific cancers, such as conjunctival carcinoma, in HIV-infected people differs. © 2001 Wiley-Liss, Inc.