Occupational exposure to diesel exhaust has been classified as probably carcinogenic and that to gasoline engine exhaust as possibly carcinogenic to humans. Earlier results concerning cancers other than lung cancer are scarce and inconsistent, and exposure-response relations have seldom been reported. We followed up a cohort of all economically active Finns born between 1906 and 1945 for 30 million person-years during 1971-1995. Incident cases of esophageal cancer (n = 2,198), ovarian cancer (5,082), testicular cancer (387), kidney cancer (7,366), bladder cancer (8,110) and leukemia (4,562) were identified through a record linkage with the Finnish Cancer Registry. Occupations from the population census in 1970 were converted to exposures to diesel and gasoline engine exhausts with a job-exposure matrix (FINJEM). Cumulative exposure (CE) was calculated as product of prevalence, level and estimated duration of exposure. The relative risk (RR) of cancer for exposure categories in relation to the unexposed group was calculated using the Poisson regression model and adjusted for confounders. An increasing RR for ovarian cancer was observed with the increasing CE of diesel exhaust (p for trend = 0.006). The RR in the highest CE category was 3.69 (95% CI = 1.38-9.86). For gasoline engine exhaust, the RR was significantly increased only in the middle CE category (1.70; 95% CI = 1.11-2.62). Slight elevations of RR for bladder and kidney cancers were found at the lowest exposure level of engine exhausts, largely attributable to drivers. No effect of the exposures was observed for the other cancers. This study suggests an exposure-response relation between diesel exhaust and ovarian cancer.