Australia's High Court has ruled a gene which greatly increases the chances of breast and ovarian cancer cannot be patented.
A US medical research firm was awarded the patent for the BRCA1 gene after isolating it in the 1990s.
But the high court unanimously overthrew earlier rulings and said the discovery could not be considered an invention so could not be protected.
Cancer campaigners say the ruling makes testing for the gene more accessible.
Myriad Genetics, which holds the patents and makes tests for the gene, had argued a patent would encourage further research investment.
But the court in Canberra said that while detecting the gene "might be, in a formal sense, a product of human action, it was the existence of the information stored in the relevant sequences that was an essential element of the invention as claimed".
The discovery did not, therefore, count as an invention under patent laws.
The US Supreme Court had already ruled against the patent in 2013.
'Forewarned on cancer risk
The case was brought by Yvonne D'Arcy, twice a survivor of breast cancer.
The 69-year-old said she was thrilled with the verdict as it would make it easier for people to be tested for cancer risks.
"For all those people who do have the genetic footprint for breast cancer, ovarian cancer, any cancer basically, it's a win for them because they are forewarned."
Anyone carrying the "faulty" BRCA1 and BRCA2 genes has a greatly increased chance of developing breast cancer and other ovarian cancers, so may choose to have preventative surgery including a mastectomy.
Ms D'Arcy, who brought the case along with campaigning network Cancer Voices Australia, said it had been "a David and Goliath test".
"I'm only a little person - but it's not the size of the dog in the fight, it's the size of the fight in the dog."