Researchers found that the longer mums breastfeed their infants, the more likely they are to grow up into well-educated and higher-earning adults.
The Brazilian study followed nearly 6,000 babies from birth for the past three decades.
Nearly 3,500 them were then invited to sit IQ tests at the age of 30. Those who had been breastfed proved to be more intelligent, had spent longer at school and earned more than those who had not been.
And the longer they were breastfed as a baby, the more high achieving they were.
Dr Bernardo Lessa Horta from the Federal University of Pelotas in Brazil said: "Our study provides the first evidence that prolonged breastfeeding not only increases intelligence until at least the age of 30 years but also has an impact both at an individual and societal level by improving educational attainment and earning ability."
Experts say the results, while not conclusive, appear to back current advice that babies should be exclusively breastfed for six months.
But they say mothers should still have a choice about whether or not to do it.
The research - published in The Lancet Global Health - stressed there are many different factors other than breastfeeding that could have an impact on intelligence, although the researchers did try to rule out the main confounders, such as mother's education, family income and birth weight.
Dr Horta said his study offers a unique insight because in the population he studied, breastfeeding was evenly distributed across social class - not something just practised by the rich and educated.
Most of the babies, irrespective of social class, were breastfed - some for less than a month and others for more than a year.
Those who were breastfed for longer scored higher on measures of intelligence as adults.
They were also more likely to earn a higher wage and to have completed more schooling.
Dr Horta believes breast milk may offer an advantage because it is a good source of long-chain saturated fatty acids which are essential for brain development.
But experts say the study findings cannot confirm this and that much more research is needed to explore any possible link between breastfeeding and intelligence.
Kevin Fenton, national director of health and wellbeing, Public Health England, said there was strong evidence that breastfeeding provides some health benefits for babies - reduced respiratory and gastrointestinal infections in infancy, for example.
He said: "PHE's advice remains that exclusive breastfeeding for around the first six months of life provides health benefits to babies."We recognise however, that not all mothers choose, or are able, to breastfeed and infant formula is the only alternative to breast milk for babies under 12 months old."
Janet Fyle, from the Royal College of Midwives, said new mothers needed breastfeeding support.
And Dr Colin Michie, chairman of the Royal College of Paediatrics and Child Health's nutrition committee, said: "There have been many studies on the link between breastfeeding and IQ over the years with many having had their validity challenged.
"This study however, looks at a number of other factors including education achievement and income at age 30 which, along with the high sample size, makes this study a very powerful one.
"It is important to note that breastfeeding is one of many factors that can contribute to a child's outcomes, however this study emphasises the need for continued and enhanced breastfeeding promotion so expectant mothers are aware of the benefits of breastfeeding."
More on Parentdish: Bribed to breastfeed? We can do better than that