Obese young people can still turn their chances of developing life threatening illness around if they change before middle age, says new research.

The study looked at the body mass index (BMI) of people when they were young and compared it to when they were middle aged to see whether it affected their risk of heart attack, stroke or diabetes.

Men who had high BMI levels at 21, but had lowered their BMI by the time they were 50, had similar or lower rates of diabetes as people who were normal weight when younger, the results showed.

In a unique approach, the study used the records of men's military service, which recorded their BMI at 21, as well as participant recall and followed up with them 30 years later.

Lead research Professor Christopher Owen from St George's University of London said the effects of high BMI early in life may be reversible.

"Even in men who carried out UK National Service and were relatively thin in early life compared to more recent men, higher levels of fatness in early adult life appear to be associated with later diabetes," he said.

"However, effects of early body mass appear to be reversible by subsequent weight loss. These findings have important implications for Type 2 diabetes prevention, especially in more recent adults with high levels of obesity."

But the study, which examined almost 5000 men, found that a higher BMI earlier in life did not impact on the risk of heart attack or stroke.

However, men who were obese when they were 50 had increased chances of suffering a heart attack, stroke or diabetes.

Obesity is the biggest risk factor for type 2 diabetes and over 4 million people in the UK are at high risk of developing the condition.