BACKGROUND Outbreaks of Escherichia coli O157:H7 infections have involved direct transmission from animals and their environment to humans. We describe an outbreak among visitors to a Pennsylvania dairy and petting farm that provides public access to animals. METHODS We conducted both a case-control study among visitors to a farm to identify risk factors for infection and a household survey to determine the rates of diarrheal illness among these visitors. We performed an extensive environmental study to identify sources of E. coli O157:H7 on the farm. RESULTS Fifty-one patients with confirmed or suspected E. coli O157:H7 infection were enrolled in the case-control study. The median age of the patients was four years, and the hemolytic-uremic syndrome developed in eight. Contact with calves and their environment was associated with an increased risk of infection, whereas hand washing was protective. The household survey indicated that visitors to the farm during the outbreak had higher than expected rates of diarrhea. Environmental studies showed that 28 of the 216 cattle on the farm (13 percent) were colonized with E. coli O157:H7 that had the same distinct pattern on pulsed-field gel electrophoresis that was found in isolates from the patients. This organism was also recovered from surfaces that were accessible to the public. CONCLUSIONS In a large outbreak of E. coli O157:H7 infections among visitors to a dairy farm, predominantly children, high rates of carriage of E. coli O157:H7 among calves and young cattle most likely resulted in contamination of both the animals' hides and the environment.