This is the first study to provide a comprehensive insight into the molecular epidemiology of endemic Clostridium difficile and particularly that associated with a recently recognized epidemic strain. We DNA fingerprinted all C. difficile isolates from the stools of patients with symptomatic antibiotic-associated diarrhoea and from repeated samples of the inanimate ward environment on two elderly medicine hospital wards over a 22-month period. Notably, C. difficile was not recoverable from either ward immediately before opening, but was found on both wards within 1–3 weeks of opening, and the level of environmental contamination rose markedly during the first 6 months of the study period. C. difficile infection (CDI) incidence data correlated significantly with the prevalence of environmental C. difficile on ward B (r = 0·76, P < 0·05) but not on ward A (r = 0·26, P > 0·05). We found that RAPD and RS–PCR typing had similar discriminatory power, although, despite fingerprinting over 200 C. difficile isolates, we identified only six distinct types. Only two distinct C. difficile strains were identified as causing both patient infection and ward contamination. Attempts to determine whether infected patients or contaminated environments are the prime source for cross-infection by C. difficile had limited success, as over 90% of C. difficile isolates were the UK epidemic clone. However, a non-epidemic strain caused a cluster of six cases of CDI, but was only isolated from the environment after the sixth patient became symptomatic. The initial absence of this strain from the environment implies patient-to-patient and/or staff-to-patient spread. In general, routine cleaning with detergent was unsuccessful at removing C. difficile from the environment. Understanding the epidemiology and virulence of prevalent strains is important if CDI is to be successfully controlled.