We compared the virulence profile and REP-PCR genotypes of Escherichia coli strains isolated from subclinical and clinical mastitis cases and dairy farm environments in Minas Gerais State, Brazil, to determine virulence factors and genotypes potentially associated with subclinical persistence in the udder. The virulence profile was obtained by the search for three virulence genes: lpfA (long polar fimbriae), fliC (flagella), and escN (type III secretion system). Subclinical isolates exhibited mainly the fliC gene (33.33%) and fliC + escN genes (30.30%). Clinical isolates exhibited mainly fliC + escN genes (50%) and environmental isolates the lpfA + escN genes (58.04%). Strains isolated from subclinical mastitis showed 6.75 times more positivity to fliC than environmental isolates. Thirty-four genotypes were observed in the REP-PCR analysis, and clinical mastitis isolates indicated more genetic proximity to dairy farm environment isolates than subclinical mastitis isolates. In conclusion, the results suggested that flagella may be an important virulence factor for mammary persistent E. coli infection in cattle, however, none of the E. coli REP-PCR genotypes were associated with subclinical infection.