Children who are breastfed for four months or more develop fewer behaviour problems, Oxford researchers say.
The study, involving 10,000 mothers and their babies and in journal Archives of Disease in Childhood, says that may be because of the make-up of breast milk.
Or, it says, breastfeeding may lead to better mother-baby interaction.
Breastfeeding is already associated with other health benefits for babies, including lower rates of infection and less obesity in later life.
Researchers looked at the feeding habits of 10,037 mothers and their babies involved in a large study known as the Millennium Cohort Study.
The mothers were asked to assess problems in their children by the age of five, including anxiousness and clinginess, restlessness, and lying or stealing.
Only 6% of children who were breastfed showed signs of behaviour problems, compared with 16% of children who were formula-fed.
Mothers who breastfeed tend to be older, better educated, and from a higher socio-economic background, which may contribute towards fewer problems in their children's behaviour.
But even after the researchers, from the Universities of Oxford, Essex, York and University College London, adjusted their figures to take that into account, they still found there was a 30% greater risk of behavioural problems among formula-fed children.
"Our results provide even more evidence for the benefits of breastfeeding," said Maria Quigley of Oxford University, who led the research.
She said breast milk contained large quantities of a particular type of fatty acid, as well as growth factors and hormones, which were important for the development of the brain and nervous system.
But mothers who breastfeed also tend to interact with their children more, which could mean the babies learn more about acceptable ways of behaving.
Breastfed children also get ill less often, which may affect their behaviour.
"We just don't know whether it is because of the constituents in breast milk, or the close interaction with the mum, or whether it is a knock-on effect of reduced illness in breastfed babies," said Ms Quigley.
"But it does begin to look like we can add fewer behavioural problems as another potential benefit of breastfeeding."
The Royal College of Midwives welcomed the findings and said they added to the evidence that breastfeeding was better for babies.
Janet Fyle from the RCM said it was vital women had enough help and support from midwives to help them keep breastfeeding.
But she said it was important not to over-emphasise the study's results.
"We must not send a negative message to mothers that they have failed, or make then feel guilty because they bottle-fed their babies," she said.