Finally, the same test was used to pick up signs of evolving cancer showing the first signs of drug resistance.

Professor Johann de Bono, who led the team at The Institute of Cancer Research in London, said: “We were able to develop a powerful, three-in-one test that could in future be used to help doctors select treatment, check whether it is working and monitor the cancer in the longer term.

“We think it could be used to make clinical decisions about whether a PARP inhibitor is working within as little as four to eight weeks of starting therapy.

“Not only could the test have a major impact on treatment of prostate cancer, but it could also be adapted to open up the possibility of precision medicine to patients with other types of cancer as well.”

In future, the test could allow the PARP inhibitor olaparib to become a standard treatment for advanced prostate cancer, by targeting those most likely to benefit, picking up early signs that the drug might not be working, and monitoring for emerging resistance.

PARP inhibitors such as olaparib block an enzyme used by cancer cells with defective BRCA 1 and 2 genes to repair their DNA. When PARP is disabled, the cells die.

The drugs do not generally work on cancer cells with functioning BRCA genes, because these are primary DNA repair tools that make PARP unnecessary.

While some patients respond to the drugs for years, others either fail to respond at an early stage or develop resistant cancer.

Researchers analysing the blood samples were able to identify men with defective BRCA genes who were likely to benefit from a class of drugs called PARP inhibitors (Anthony Devlin/PA)

The new test was developed with the help of 49 patients enrolled in TOPARP-A, a Phase II clinical trial investigating the effectiveness of olaparib.

Men responding to the drug were found to experience an average drop in circulating cancer DNA of 49.6% after eight weeks of treatment. In contrast, cancer DNA levels rose by 2.1% in patients who did not respond.

Patients whose cancer DNA blood levels were lowered by olaparib survived an average of 17 months compared with 10.1 months for those whose levels remained high.

The scientists also conducted a detailed investigation of the genetic changes in cancer DNA among men who stopped responding to olaparib.

They found that the cells acquired genetic changes that cancelled out the DNA repair defects making them susceptible to the drug.

“They are cheap and simple to use, but most importantly, because they aren’t invasive, they can be employed or applied to routinely monitor patients to spot early if treatment is failing – offering patients the best chance of surviving their disease.”