Faecal Escherichia coli isolates from suckling (n5503) and weaning (n5450) piglets with and without diarrhoea from 10 farms in Mexico were examined for identification and prevalence of virulence genes. E. coli isolates were tested further for enterotoxin (LT, STa, STb, Stx1, Stx2 and EAST1), fimbrial (F4, F5, F6, F17, F18 and F41) and eae adhesin genes by multiplex PCR. Of the 953 isolates of E. coli examined by multiplex PCR, 650 (68.2 %) isolates were positive for at least one adhesin gene. Among the isolates from diarrhoeic piglets, F41 (72 %) was the most prevalent adhesin followed by eae adhesin (27 %), F6 (12 %), F17 (9 %), F18 (9 %), F5 (8 %) and F4 (3 %). Enterotoxin genes were detected in 424 (44.5 %) of the isolates, of which EAST1 (38 %) and STa (30 %) were the most common, followed by STb (17 %), Stx2 (6 %) and LT (5 %). Twenty-three per cent of isolates from suckling piglets and 43 % of isolates from weaned piglets carried both enterotoxin and adhesin genes, the most common virotypes being F41 : STa, F41 : EAST1, EAST1 : eae, F41 : F6, F41 : STa : STb, F41 : eae and F17 : eae. The present study examined for the first time, to our knowledge, the prevalence of 13 virulence genes among E. coli strains isolated from piglets with and without diarrhoea in Mexico. The results suggested that there are a wide variety of virulence genes associated with diarrhoea in piglets. This study provides baseline information on the significance of specific virotypes associated with suckling and weaning periods in piglets in Mexico.