Previous trials showed that the drug rapamycin was ineffective as a general therapy for pancreatic cancer.
But new evidence suggests it might work against a particular type of tumour caused by a fault in the PTEN gene, which influences cell growth.
When rapamycin was given to mice with PTEN-defective pancreatic tumours it stopped cancer cells from spreading. In some cases, the drug also caused tumours to shrink.
An analysis of human pancreatic tumour samples found that around one in five had the defective gene, suggesting that rapamycin might help a substantial number of patients.
Lead researcher Dr Jennifer Morton, from the Cancer Research UK Beatson Institute at the University of Glasgow, said: "This is incredibly important research showing for the first time that there's potential to tailor treatment to pancreatic cancer patients based on differences in their tumour's genetic fingerprint.
"Although it's at a very early stage, it's the first time we've been able to pinpoint a genetic fault in pancreatic cancers and match it up with a specific drug.
"It's a crucial step forward in developing new treatments for this devastating disease."
The new research is published in the journal Gut.
Dr Kat Arney, science communications manager at Cancer Research UK, said: "This is a promising step towards being able to personalise treatments to them."