Amongst the general population of healthy women, breastfeeding for a year reduces the risk of breast cancer by 4.3 per cent, the authors said.
Almost 6,000 women with the BRCA1 or BRCA2 genes were included in the study, with around half having already been diagnosed with cancer.
The women were matched to each other as closely as possible, including number of births, age and body weight, giving 1665 pairs to be analysed.
The cancer sufferers had breastfed for an average of two months less than those without cancer.
It was calculated that breastfeeding for one year reduced the risk of cancer by 32 per cent and for two or more years cut it by almost half.
The researchers said each year of breastfeeding reduced the risk of breast cancer by 19 per cent.
Co author Dr Steven Narod, wrote in the journal BioMed Central: "These findings corroborate a protective role of breastfeeding on breast cancer risk for BRCA1.
"The lack of an association for BRCA2 mutation carriers suggests that the biological pathway for carcinogenesis is different for the two genes. Women with a BRCA mutation should be advised of the benefit of breastfeeding in terms of reducing breast cancer risk."