To determine the prevalence, incidence, and types of lung diseases that occur in association with HIV infection, 1,353 subjects, including HIV-seropositive homosexual men, injection drug users, female sexual partners of HIV-positive men, and HIV-seronegative control subjects from the first two transmission categories were evaluated prospectively in a multicenter study. Patients with AIDS at the time of initial evaluation were excluded. One thousand two-hundred ninety-four subjects who had no AIDS-defining diagnosis within 3 mo of enrollment had measurements of FVC, FEV1 and DLCO at the time of enrollment. As a group, all subjects had mean values of FVC and FEV1 close to 100% predicted. Those with CD4 counts below 200/mm3 had slightly reduced DLCO compared with the others. Subjects with a history of HIV-associated symptoms (thrush, weight loss, herpes zoster) also had a reduced DLCO compared with those without symptoms. Injection drug users had reduced FVC, FEV1 and DLCO compared with homosexual men and female sexual partners of HIV-infected men, with DLCO more substantially reduced. Part of the reduction in DLCO in drug users was attributable to factors other than HIV infection, especially cigarette smoking and race. Using predicted values that take cigarette smoking into account, the prevalence of abnormality in DLCO was higher among injection drug users (33.3%) than among homosexual men (11.2%) and female sexual partners (12.7%). These results show that advanced HIV infection, characterized by CD4 count < 200/mm3 or HIV-associated symptoms, and factors unrelated to HIV infection, including race, cigarette smoking, and injection drug use, are all associated with reductions in DLCO measurements.