Two separate animal populations consisting of a herd of cattle (19 animals) and a flock of sheep (25 animals) were investigated for strains of Escherichia coli producing Shiga toxins (STEC) over a time period of 6 months. Thirty-three STEC were isolated from 63.2% of cattle and grouped into II serotypes and eight electrophoretic types (ETs) by multilocus enzyme analysis. In sheep, 88% of the animals excreted STEC (n = 67 isolates) belonging to 17 different serotypes and 12 different ETs. STEC from cattle and sheep differed with respect to serotype, and only 4 of the 16 ETs occurred in both animal populations. In cattle, ET14 (0116:1121) strains predominated, whereas other STEC serotypes occurred only sporadically. The predominating STEC types in sheep were ET4 (0125 strains), ET11 (0128:112 and others), and ET14 (0146:H21). In contrast to their diversity, STEC originating from the same animal population were similar with respect to Shiga toxin (stx) genes. Almost all STEC isolated from cattle were positive for stx(2) and stx(2c); only one was positive for stx(1). In sheep, almost all STEC isolated were positive for stx(1) and stx(2), whereas stx(2c) was not found. XbaI-digested DNAs of genetically closely related 0146:1121 strains have different restriction profiles which were associated with size alterations in XbaI fragments hybridizing with stx(1)- and stx(2)-specific DNA probes. Our results indicate that stx-encoding bacteriophages might be the origin of the genetic heterogeneity in STEC from animals.