Faecal samples from 180 patients on admission and 108 patients at discharge were analysed for the prevalence and degree of resistance of Escherichia coli and enterococci. Discharged patients had received 24 h cefazolin prophylaxis and had a mean hospital stay of 10 +/- 5 days. The prevalence of resistance of E. coli to amoxicillin (P < 0.05), cefazolin (P < 0.05) and oxytetracycline was higher for patients at discharge (41, 12 and 35%) than for patients at admission (28, 2 and 27%). The prevalence at discharge was higher after short-term (< or =7 days) than after long-term (>7 days) hospitalization, being significant for amoxicillin only (P < 0.05). No significant changes were observed for the enterococci.