But larger studies involving more men needed to take place to confirm if doctors could rely on the test, the charity said.

Blood samples from 49 men with advanced prostate cancer were collected by researchers, as part of the phase II clinical trial of a drug called olaparib.

This type of precision drug is seen as the future of cancer medicine but because it is a targeted treatment, the drug does not work for everyone.

Researchers from The Institute of Cancer Research and the Royal Marsden NHS Foundation Trust said the test could help target treatment better and also reduce its side effects.

They used it to identify men who were not responding to the treatment in four to eight weeks and also to pick up signs that the cancer was evolving and becoming resistant to the drugs.

‘Major impact’

Prof Johann de Bono, consultant medical oncologist at the two organisations, said: “From these findings, 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.”

He added: “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.”

Dr Aine McCarthy, senior science information officer at Cancer Research UK, said the blood test was an “exciting” development.

“The test has the potential to greatly improve survival for the disease by ensuring patients get the right treatment for them at the right time and that they aren’t being given a treatment that’s no longer working,” she said.

“Further studies involving a larger group of men will confirm if doctors should use this test when treating patients with advanced prostate cancer.”

Prostate cancer is the most common cancer in men.

Over 46,000 men are diagnosed with the disease every year in the UK.

Dr Matthew Hobbs, from Prostate Cancer UK, said: “The results from this study and others like it are crucial as they give an important understanding of the factors that drive certain prostate cancers, or make them vulnerable to specific treatments.”