Researchers looked at over 2,000 people
Men with diabetes who are having trouble keeping an erection could be at increased risk of serious heart problems, suggests a study.
Those with erectile dysfunction were twice as likely as other men with diabetes to develop heart disease.
The root cause of both can be blood vessel damage caused by high blood sugar levels, the Chinese University of Hong Kong said.
Experts said men with erectile dysfunction should see their doctor.
The Journal of the American College of Cardiology reported that researchers wanted to see if erectile dysfunction could be a reliable independent warning signal for doctors that further problems were on the way.
Previous research has suggested that the arrival of the sexual problem generally precedes the development of heart symptoms in type II diabetic men by approximately three years, and the study tested this link in more detail.
A group of 2,306 men were recruited, of which just over a quarter already had erectile dysfunction. None of the men had any obvious signs of heart disease, or stroke.
Over the next four years, 123 men either suffered a heart attack, died from heart disease, developed chest pain linked to clogged arteries, or ended up needing a heart bypass or cardiac catheterisation.
Men with erectile dysfunction were approximately twice as likely to end up in this group compared with those with normal sexual performance.
Lead researcher Dr Peter Chun-Yip Tong, from the Chinese University of Hong Kong, said: "The development of erectile dysfunction should alert both patients and healthcare providers to the future risk of coronary heart disease."
He said that high blood sugar levels could lead to inflammation on the inner surface of blood vessels - which could lead to atherosclerosis, the hardening and furring up of both heart arteries, and to those supplying blood to the penis.
Dr Robert Kloner, professor of medicine at the Keck School of Medicine at the University of Southern California, said that the study was "important".
"Men should know that erectile dysfunction is a true harbinger of atherosclerotic coronary heart disease."
A second study, carried out at four medical centres in Italy, focused on nearly 300 men who had both diabetes and were in the early stages of developing heart disease.
Of these, 118 had erectile dysfunction at the beginning of the study, and over the next four years, these were twice as likely to suffer a "major cardiac event" such as a heart attack or stroke, confirming the finding of the Hong Kong study.
However, among patients taking cholesterol-lowering drugs, with or without erectile dysfunction, the risk of this was reduced by a third.
The researchers also checked to see whether Viagra, taken by some of the men with erectile dysfunction, could have a positive effect.
While there appeared to be a reduction in risk, the numbers of men involved was too low to form strong evidence of any benefit.
A spokesman for the British Heart Foundation said that men with erectile dysfunction should be checked by their GP.
"Sadly, a lot of men with erectile dysfunction ignore it instead of seeking help and support. Reporting erectile dysfunction could help them to access tests and treatments that will lower their chances of having a heart attack or stroke."