The aim of this study was to examine prospectively the relation between duration of breast feeding and cognitive outcomes. A cohort study of 2860 children enrolled before birth provided data from 2393 term infants of English-speaking mothers. Of these, complete infant feeding data in the first year of life and verbal cognitive IQ (Peabody Picture Vocabulary Test - PPVT-R) were available for 1450 children at 6 years, and a performance subtest (Perceptual organisation WISC - Block Design) for 1375 children at 8 years. Full breast feeding was categorised as none,> 0 to < 4 months, 4-6 months and> 6 months. Associations between breast-feeding duration and PPVT-R at 6 years and Block Design at 8 years were estimated before and after adjustment for gender, gestational age, maternal age, maternal education, parental smoking and the presence of older siblings. The early cessation of full breast feeding was associated with reduced verbal IQ and the performance subtest. In unadjusted analysis, mean standardised PPVT-R scores were 6.44 points greater (P < 0.0001) in children fully breast fed for> 6 months compared with those never breast fed. After adjustment, mean PPVT-R scores were 3.56 points higher in children fully breast fed for> 6 months compared with those children never breast fed (P = 0.003). Similarly, Block Design scores were higher in those fully breast fed for> 6 months compared with those never breast fed in unadjusted (P = 0.001) but not adjusted analyses (P = 0.223). Interactions between maternal education (four levels) and breast feeding demonstrated a positive association of maternal education on verbal IQ (F = 2.64; P = 0.005) in children breast fed for longer but not on performance (F = 0.74; P = 0.67). The early introduction of milk other than breast milk was associated with reduced verbal IQ after adjustment for social and perinatal confounders. Although these effects were interacting with maternal education, they may act through undefined mechanisms in human milk.