A common virus may be the trigger for the development of many cases of diabetes, particularly in children, UK researchers have reported.
Signs of enteroviruses were found in pancreatic tissue from 60% of children with type 1 diabetes, but in hardly any children without the disease.
They also found that 40% of adults with type 2 diabetes had signs of the infection in insulin-producing cells.
The study published in Diabetologia raises the possibility of a vaccine.
Although genetics is known to play a fairly substantial role in a person's risk of developing diabetes, environmental factors must also be involved and the idea of a viral cause of diabetes has been considered for decades.
The latest study was made possible by a pathologist in Glasgow who for 25 years collected tissue samples from children across the UK who had died less than 12 months after being diagnosed with type 1 diabetes.
Dr Alan Foulis believed that enteroviruses - a common family of viruses which cause symptoms such as vomiting and diarrhoea - would be present but until recently the technology was not sensitive enough to detect them.
Along with colleagues from the south west-based Peninsula Medical School and the University of Brighton, he has now been able to look for evidence of the enteroviruses in tissue samples routinely taken during autopsy in 72 children and compare that with samples from 50 children without the condition.
In those with diabetes who had signs of the virus, it was specifically found in the insulin-producing beta cells.
The researchers suggest that, in children with a genetic predisposition to type 1 diabetes - an autoimmune disease in which beta cells in the pancreas are destroyed - enterovirus infection can trigger the immune reaction that kicks off the disease process.
With type 2 diabetes - the type often linked to obesity in adults - the researchers speculate that the infection affects the ability of the cells to make insulin, which in combination with the greater demand for insulin in obese people, is enough to set off the disease.
At the same time, a separate study, published in Science, by researchers at Cambridge University, found four rare mutations in a gene which reduce the risk of developing type 1 diabetes.
It also backs the viral theory because the gene in question is involved in the immune response to infection with enteroviruses.
There are 100 different strains of enterovirus, so although the results open the way for the development of a vaccine, researchers still have to pin down which types are involved.
The study's author, Professor Noel Morgan from the Peninsula Medical School, said the results showed the underlying infection with enteroviruses was not a "rare event".
"The next stages of research - to identify which enteroviruses are involved, how the beta-cells are changed by infection and the ultimate goal to develop an effective vaccine - will lead to findings which we hope will drastically reduce the number of people around the world who develop type 1 diabetes, and potentially type 2 diabetes as well," he added.
Dr Iain Frame, director of research at Diabetes UK, said the study was "a big step forward" in understanding the potential triggers for the disease.
"We've known for some time that type 1 diabetes cannot be explained by genetics alone and that other, environmental triggers may also play a part.
"The next steps to identify the viruses and find out what they are doing to the infected beta cells will be hugely exciting and will take us a step closer to preventing Type 1 diabetes."
Karen Addington, chief executive of the Juvenile Diabetes Research Foundation, who funded the research, said the findings were important as the incidence of type 1 diabetes is increasing every year and there is currently no way to prevent it.
"Type 1 diabetes is a life- threatening condition that requires a life-time of painful finger prick blood testing and insulin inje