Though the practice has been tied to a range of health benefits early in life, such as lower infection risks, researchers aren't quite sure what about breastfeeding might boost brainpower. But they have a few theories.
"There are essential fatty acids in breast milk which are good for cell development and brain development in particular," said Amanda Sacker, one of the authors of the new study from the Institute for Social and Economic Research at the University of Essex.
Or, "there could be differences in hormones and growth factors which are lacking in formula," she added.
"The third (possibility) is a purely social explanation. Perhaps children who are breastfed get cuddled more, and this confers some sort of advantage to them as well."
Then at five years, kids were brought in for tests that measured their vocabulary, reasoning and spatial skills.
Whether they were born on time or as preemies, kids tended to do better on the tests when they had been breastfed.
Those who were born on time and breastfed for four or six months were a few months ahead of their non-breastfed peers on vocabulary and picture-related reasoning tests.
Preemies who had been breastfed for as little as two months were also a few months ahead on picture and spatial tests compared to the other once-premature five-year-olds, and those who were breastfed for four months saw a vocabulary boost.
"These differences were very small when you think about it," Sacker told Reuters Health. However, for "kids who start off at a disadvantage, the gaps tend to get wider rather than narrower as they get older."
Some, but not all previous studies that looked for a link between breastfeeding and thinking skills or IQ have reported similar results.
Dr. David McCormick, a pediatrician at The University of Texas Medical Branch at Galveston, said that breastfeeding may benefit the immune system, development and brain function.
"There are so many advantages other than just the IQ advantage," McCormick, who was not involved in the new study, told Reuters Health.
While the current study could not look at differences between babies who were only fed breast milk and those who got a mix of breast milk and formula, "the evidence has always been exclusive breastfeeding is best," he said.
Do you breastfeed your premmie?