Experimental gene therapy has cured mice of diabetes, and although work is at a very early stage, scientists hope the technique will one day free people from its effects.
United States scientists introduced a gene to the mice that enabled their livers to generate insulin.
Professor Lawrence Chan, who led the research at the Baylor College of Medicine in Houston, Texas, said: "It's a proof of principle. The exciting part of it is that mice with diabetes are 'cured'."
Liver cells were induced to become beta cells that produce insulin and three other hormones.
Beta cells are normally found within small bodies embedded in the pancreas, called "islets".
Transplanting islets is one of the ways diabetes can be treated, but a compatible donor must be found and the patient has to take powerful immunosuppressive drugs.
The condition occurs when glucose sugar is not used properly to fuel cells, but builds up in the blood. If not treated, a person with diabetes will ultimately lapse into a coma and die.
In healthy people, insulin helps glucose enter cells and regulates blood sugar levels.
People with type 1, or insulin dependent diabetes, produce virtually no insulin because their islets have been destroyed by their own immune system.
In the case of type 2 diabetes, the body does not produce enough insulin or respond to the hormone normally.
Professor Chan's team used a doctored virus to carry the beta cell gene into the mouse liver cells.
On its own, the gene partially corrected the disease. Combined with a beta cell growth factor, a biochemical that promotes growth, the diabetic mice were completely cured for at least four months.
An added benefit was that the modified liver cells also produced glucagon, somostatin and pancreatic polypeptide. These three hormones are thought to play a role in controlling insulin production and release.
The results were reported in the online edition of the journal Nature Medicine.
Professor Chan said the main obstacle to using the treatment on humans was concern about the safety of the virus "vector".
Although the safest viral vector available was used, he expected safer ones to become available within the decade.
"We want to use the safest vector possible," he said.