It might be hard to believe, but erectile dysfunction (ED) is not always caused by a sex-related problem. A man’s inability to get or maintain an erection is often linked to type 2 diabetes, cardiovascular disease and perhaps low levels of the male hormone testosterone. Indeed, for many men, the possible loss of sexual potency is what may get them to pay attention to these serious health conditions.

Currently, more than 12 million U.S. men are estimated to have type 2 diabetes, and this number is growing fast, especially in the African-American community. Diabetic men are at a greater risk of developing plaque in their blood. Plaque is a mix of calcium, fat, cholesterol, cellular waste and fibrin, a material involved in blood clotting. When even a tiny amount of plaque builds up on the walls of the small blood vessels that take blood to the penis, it can restrict blood flow and cause erection problems. (Poor blood flow is the No. 1 cause of ED.)

In addition, having type 2 diabetes may also lower a man’s testosterone level and diminish his sex drive. (But it’s uncommon for low testosterone to trigger ED.)

“My advice [to a patient] would be to get your diabetes under as much control as possible and then seek therapeutic options for ED with a board-certified urologist,” says Timothy B. Boone, MD, chairman of the department of urology at The Methodist Hospital in Houston.

This way, improvements to your health—and bedroom action—are sure to follow.