A number of studies in developed countries suggest that breastfeeding protects against infections in infancy. However, the choice to breastfeed is often related to maternal characteristics, and many of these studies are limited in the extent to which they can take account of confounding influences. In a prospective birth cohort study, we assessed the relationship between the duration of breastfeeding and the prevalence of lower respiratory tract infections, ear infections and gastrointestinal morbidity during the first year of life in 1764 infants. We considered the duration of all breastfeeding, including mixed feeding. Eighty-one per cent of the infants were breastfed initially, and 25% were breastfed up to 6 months. There were graded decreases in the prevalence of respiratory and gastrointestinal symptoms between birth and 6 months as breastfeeding duration increased; these were robust to adjustment for a number of confounding factors. The adjusted relative risks (95% confidence interval) for infants breastfed for six or more months compared with infants who were never breastfed were 0.72 (0.58-0.89), 0.43 (0.30-0.61) and 0.60 (0.39-0.92) for general respiratory morbidity, diarrhoea and vomiting, respectively. Duration of breastfeeding in the second half of infancy was less strongly related to diagnosed respiratory tract infections and gastrointestinal morbidity, although important benefits of breastfeeding were still seen. Our data provide strong support for a protective role of breastfeeding against respiratory and gastrointestinal infections in infancy. The graded inverse associations with breastfeeding duration suggest that current efforts to promote breastfeeding and increase duration will have important effects in reducing morbidity in infancy.