Quarter milk samples were taken from 150 cows from three dairy farms in south-east Queensland at drying off, two, four and six weeks after drying off, at calving, and one, two and three weeks after calving. In each of the herds, the cows were randomly allocated to three groups of approximately equal size. One group had all the quarters of all the cows treated at drying off with a dry cow antibiotic infusion containing cloxacillin; the second group was given no treatment, and the third group had selected quarters treated on the basis of their high activity of N-acetyl-β-D-glucosaminidase at drying off. Dry cow treatment resulted in a marked reduction in the number of infected quarters at two and four weeks after drying off, so that the comprehensively treated group had significantly less infected quarters at these times (P<0.02). Twelve clinical cases of mastitis were detected two weeks after drying off in the untreated groups, 10 in the untreated quarters of the selectively treated groups, and no cases in the comprehensively treated groups. These cases were due mainly to Streptococcus uberis and Streptococcus dysgalactiae. The number of infected untreated quarters increased markedly between drying off and two weeks later, but in all three groups there was a marked decrease in the number of infected quarters between six weeks after drying off and calving, suggesting that the mammary glands were more able to overcome infections at this time.