An antidote for cyanide poisoning could be the key to developing a new drug for type 2 diabetes.
The breakthrough by British scientists follows the discovery of a 'lean gene' that keeps people slim - and has been shown to reverse the condition in mice.
The protein is naturally produced in the body so researchers are hopeful their findings may be replicated in humans.
It opens the door to a cheap medication which could effectively halt one of the world's fastest growing diseases.
The protein called TST helps to detoxify harmful waste products that accumulate inside fat cells from a high calorie diet.
When researchers bred a strain of mice which produced high levels of TST in their fat cells they didn't put on weight or develop diabetes - even when fed a high calorie diet.
The team also gave obese mice with diabetes a drug that activates TST - thiosulpahte that has been used for years to treat cyanide poisoning.
They found it had no effect on weight loss but helped to lessen the severity of the condition.
An improved version of the medicine could be developed as a therapy for people with the condition.
The treatment improved sensitivity to insulin - a hormone that controls blood sugar levels - and could also help obese people reduce their risk of developing type 2 diabetes.
People with type 2 diabetes gradually become less sensitive to the effects of the hormone, forcing up their blood sugar.
Professor Nik Morton, of Edinburgh University, said: "Gaining this unique insight into the genes of healthy leanness could lead to a completely new approach to treating diabetes associated with obesity.
"It's a proof of concept. It's a starting point to develop drugs that target this protein.
"Thiosulphate is cheap but developing new drugs can be costly - and take up to 15 years. There is no quick fix."
The researchers were looking for genes linked to fatness to explain why some people seem predisposed to staying lean while others eating a similar diet are more likely to put on weight.
So they studied mice that had been bred over many generations to be extremely lean or extremely overweight.
They found fat tissues from the skinniest mice had high levels of the TST protein - produced by a gene of the same name.
It was discovered over 80 years ago as part of the human body's natural protection from the poison cyanide.
Thiosulphate is already used as an antidote for cyanide poisoning in people.
Researchers say the therapy would have to be further developed before it could be used as a diabetes treatment.
Professor Simon Horvat, of of Ljubljana in Slovenia, said: "For the last two decades the field of obesity genetics has been successful in identifying genes linked to rare inherited types of obesity.
"These genes are mostly associated with the brain and have effects on appetite and energy balance.
"By focusing on obesity resistance rather than susceptibility we've identified a more common genetic trait linked to leanness.
"Our findings highlight the importance of the fat tissue in peripheral control of body weight and metabolism."
The study published in Nature Medicine was funded by the Wellcome Trust and the Slovenian Research Agency.