Studies conducted in the past have shown that an increased cancer risk in women can be linked to the extra amounts of the female hormone oestrogen they receive through long-term use of the pill or HRT.
However, thus far, medical experts have assumed that women with high-risk genes suffer from a type of breast cancer, which is caused by their genetic make-up rather than their exposure to oestrogen.
The new study, involving over 3,000 women with breast cancer across Europe, has now shown that women with the breast cancer gene are 70 per cent more likely to have been long-term users of the pill or HRT than those without the gene.
"It was clear that those with the BRCA gene mutation had greater risk if there had been long-term use of the contraceptive pill," the Scotsman quoted Professor Michael Steel, of St Andrews University's Bute Medical School and one of the report's authors, as saying.
"That risk was even more if they had the gene mutation. For the first time, we produced evidence that they are more sensitive to the effect of contraceptives and HRT than other women," he added.
The researchers involved 3,123 women across Europe who had been diagnosed with breast cancer before the age of 45, examined their family histories to find out whether they were likely to be carriers of the breast cancer gene, and, on that basis, divided them into 382 "genetic" cases and 1,333 "sporadic" cases.
The use of the pill and HRT was analysed in both groups.
Professor Steel said: "In the general population (the increased risk of breast cancer linked to the pill and HRT] has been known for quite some time. What we didn't know was whether that also applied to the special sub-group of women who have got inherited risk."
He added: "The question is whether they should be advised to avoid the things that raise the risk in the general population, and the answer seems to be 'yes', at least for the oral contraceptive pill and HRT."
He further said that the findings of the study reinforced suggestions that removing women's ovaries was a good way of preventing cancer, adding that some women with a high risk of getting the disease had had their ovaries removed on the basis that they are the glands that produce oestrogen.
Prof Steel said: "There is now very good evidence that if you can demonstrate a high genetic risk, removal of the ovaries at around 40, when women have decided not to have any more children, is definitely a good way of reducing the risk. We don't understand quite why."
In the past, according to Professor Steel, scientists have believed that there are limited benefits in blocking oestrogen for those with high-risk genes.
"It is now clear that there is benefit from removal of the ovaries and from avoiding long-term use of hormones," he said.
Reacting with caution to the study's findings, cancer charities warned that there were benefits from the pill and HRT.
Nell Barrie, Cancer Research UK's science information officer, said: "We already know the contraceptive pill can slightly increase a woman's risk of developing breast cancer, but this risk returns to normal within 10 years of stopping the pill.
This study suggests the pill could increase breast cancer risk in women with faulty BRCA genes by more than it does in women without these gene faults. But the results are not conclusive. It's important to note the pill can offer protection against ovarian and womb cancer. Your doctor can help you decide what's best for you."