Scottish scientists have helped to identify a gene that plays a key role in how a commonly used diabetes drug works.
The discovery will create a new area for drug development in the future.
Researchers were able to identify an area of a chromosome that altered how well people responded to treatment by metformin.
It is taken by millions of people with diabetes around the world and has been in use for more than 50 years.
Metformin has been shown to protect against heart disease and eye and kidney disease in people with type-2 diabetes and has also been shown to have benefits against cancer - but scientists did not know exactly how it worked.
However, new research carried out at the University of Dundee, Oxford University and the Wellcome Trust Sanger Institute as part of the Wellcome Trust Case Control Consortium shed light on how the body works with and makes use of metformin.
Dr Ewan Pearson, Professor Colin Palmer and colleagues based in the Biomedical Research Institute at the University of Dundee used data from a clinical information system of patients with diabetes linked to donated blood samples from 20,000 people in Tayside.
Dr Pearson said: "Our finding draws together mechanisms that protect against cancer and lower blood sugar, suggesting a new area for diabetes drug development."
Prof Palmer added: "This is an important development in defining how individuals may respond differently to diabetes drugs, but further work is required before we have enough information to be able to reliably use genetic testing in the clinic to guide treatment of common forms of type-2 diabetes."
The research was funded by the Wellcome Trust and Diabetes UK and is published in the journal Nature Genetics. Diabetes UK has now awarded Dr Pearson further funding to continue his research using new genetic techniques on 8000 people with type-2 diabetes.