Tamoxifen is given to most women with breast cancer
Scientists have identified a key reason for the drug tamoxifen failing to help some women with breast cancer.
The Cancer Research UK team pinpointed a molecular imbalance which stops the drug working.
Writing in Nature, the team say having this detailed understanding will help develop more effective treatments for women with breast cancer.
The Cambridge researchers add that the finding could also help explain other examples of drug resistance.
Oestrogen can cause breast cancer cells to grow and divide but tamoxifen prevents this, helping lower the risk of the disease returning.
Around 45,000 cases of breast cancer are diagnosed in the UK each year - and up to two-thirds will be prescribed the drug. Women ideally take it for five years after their diagnosis.
But 25-30% will develop resistance to the treatment after time, meaning their cancer is more likely to return.
Scientists have been seeking ways of identifying these women so that time is not wasted, and treatment is better tailored.
'We can make repairs'
In this study, which involved 100 breast cancer patients, the Cancer Research UK Cambridge Research Institute found tamoxifen works by switching off the breast cancer gene HER2 via a protein called PAX2.
In patients receiving tamoxifen treatment, the highest levels of PAX2 were associated with improved survival.
In contrast, tumours resistant to the drug had higher levels of another molecule, AIB-1, which competes with PAX2 in a molecular "tug-of-war" to control HER2.
Which molecule wins determines if that switch is off or on.
Dr Jason Carroll, who led the study, said: "We knew that women developed resistance to tamoxifen but previously our understanding of why this occurred could be compared with trying to fix a broken car without knowing how the engine worked.
"Now we understand how all the engine parts operate and we can try to think about ways to make repairs."
He added: "We can use this information to predict who will respond to tamoxifen and, more importantly, who won't.
"It will mean that we would no longer waste time that could have been better used giving more effective therapies and treatments.
If a woman is not going to benefit from tamoxifen, she could be given other drugs such as Herceptin or a class of medicines called aromatase inhibitors, which act on tumours in different ways.
Dr Carroll said the failed mechanism would not account for all cases of tamoxifen resistance.
But he added: "We're not talking about a small percentage of cases of tamoxifen resistance. I would think it's going to account for quite a significant number."
The researchers say it is important for their findings to be replicated in larger groups.
But they say a test could be possible in five years' time, and that the process that stops tamoxifen working could also occur with other drugs.
Professor Sir David Lane, Cancer Research UK's chief scientist said: "Tamoxifen has been a huge success story helping to prevent breast cancer recurring for many women.
"Understanding why it occasionally stops working is really important because it allows us to identify new targets for drug development and who will need such treatments."
Dr Alexis Willett, of Breakthrough Breast Cancer, said: "This research gives us a better understanding of one of the ways resistance can occur and is an important step towards developing improved treatments for patients.
"It's vital that research continues into why resistance occurs and how to overcome it."