A prevalence study of verotoxin-producing Escherichia coli O157 (VTEC O157) was performed in 371 randomly selected dairy herds distributed throughout Sweden. Faecal and manure samples were collected and analysed by immunomagnetic separation and culturing. Data were recorded for each herd regarding herd size, age of sampled animals and whether, in addition to cattle, the farm kept other animals. VTEC O157 was isolated from 33 (8·9%) of the 371 investigated herds. The prevalence was higher (23·3%) in Halland county than in the rest of Sweden (P>0·01). Halland was also the county in Sweden that during the study period had the highest incidence of human VTEC O157 cases. VTEC O157 was not detected on any farm in northern Sweden. Identified risk factors, in the multivariate analyses, for herds being VTEC O157 positive were herd size, geographical localization, presence of pigs on the farm and median age of sampled animals.