Pancreatic cancer may lurk in the body for many years before patients fall ill, US scientists say.
Research hints at earlier opportunities to spot and treat the disease, which is fatal in 95% of cases.
Genetic analysis of tumours by the Howard Hughes Medical Institute and Johns Hopkins University suggested the first mutations may happen 20 years before they become lethal.
UK survival rates for the disease have not improved in the past 40 years.
The disease is often aggressive and unresponsive to treatment by the time it is diagnosed.
The study, published by the Nature journal, found that tumours appear to be slow growing.
They looked at tissue samples, both from the "primary" tumours in the pancreas, and from other parts of the body to which the cancer had spread, called "metastatic" tumours.
The DNA in every gene of these tumours was sequenced, looking for signs of mutations - points at which the genetic code has changed.
On average each metastatic tumour had 61 cancer-related mutations. Two-thirds of these had been present in the original pancreatic tumour.
Because such genetic mutations occur at a relatively steady rate, this accumulation of mutations offers an insight into just how long the cancer had been developing and growing at each stage.
Using this "molecular clock", the researchers estimated that on average, it took 11.7 years for a single gene mutation in a pancreas cell to become a "mature" pancreatic tumour.
From this point, an average of another 6.8 years elapsed before cells from the pancreatic tumour formed a tumour in another organ.
However, once this stage had been reached, less than three years passed before the patient died.
So, from start to finish, the development of the disease took more than 20 years on average.
Researcher Dr Bert Vogelstein said that there had been two theories about why pancreatic tumours were so lethal - either that they were highly aggressive from the start, or that they were so advanced at the time of diagnosis, that little could be done.
He said: "We were surprised and pleased to discover that this second theory is correct, at least for a major fraction of tumours.
"It means that there is a window of opportunity for early detection of pancreatic cancer."
'Early diagnosis need'
Dr Elizabeth Rapley, from the UK's Institute of Cancer Research, said that the findings also helped explain just why the disease was so hard to treat once it had spread around the body.
She said: "It showed that the genetic code changed as it spreads to other organs. This could mean that developing effective treatments for patients with advanced disease will be challenging."
The Pancreatic Cancer Research Fund welcomed the findings, but said that research was underfunded in the UK.
Chief executive Maggie Blanks said: "Survival rates have not improved in the past 40 years and whilst the disease is the UK's fifth biggest cause of cancer death, it receives less than 2% of overall research funding.
"I'm particularly pleased that the study underlines the need for early diagnosis as there is nothing currently available."