People with diabetes are 70% more likely to die from liver disease than those without the condition, according to new research.
It is already known that diabetes can increase the risk of some types of liver disease, with poor blood sugar control boosting the risk.
This can lead to scarring of the liver - also known as cirrhosis - and cancer.
In the study, Edinburgh researchers analysed the records of people aged 35 to 84 over a six-year period to 2007.
They compared 1,267 diabetes sufferers to 10,100 people without the condition, who all died of liver disease.
The results showed about one in four (24%) people with diabetes died of liver cancer, compared to one in ten (9%) of non-diabetics.
However, more people without diabetes died from alcoholic liver disease (63%) compared to those with diabetes (38%).
Diabetic patients are advised not to drink too much alcohol because of its potential impact on blood sugar levels and the risk of weight gain.
Dr Sarah Wild, of Edinburgh University, said: "Non-alcoholic fatty liver disease has become much more common recently, particularly among people with diabetes.
"The major risk factor for it is being overweight, which is also an important risk factor for Type 2 diabetes.
"Non-alcoholic fatty liver disease increases the risk of cirrhosis which in turn increases the risk of liver cancer.
"A healthy lifestyle can reduce the risk and prevention is particularly important because the options for treatment are limited."
The research is being presented at the Diabetes UK Annual Professional Conference, which ends on Friday.
Diabetes UK director of research, Dr Iain Frame, said: "Previous studies have found a link between diabetes and liver disease and this research adds to that knowledge.
"We now need further investigation into how diabetes affects the liver to find new methods of preventing this complication."