Trouble getting or keeping an erection seems like it’s just a “down there” problem. For many men, though, it is much more. Erectile dysfunction, as it is formally known, is often an early warning sign of heart disease or other circulatory problems.

From a purely mechanical perspective, an erection is a hydraulic event—extra blood must be delivered to the penis, kept there for a while, then drained away. An erection may not happen if something interferes with blood flow to the penis.

That something is often atherosclerosis, the artery-clogging process at the root of most angina (chest pain with exercise or stress), heart attacks, strokes, and other cardiovascular conditions. One result of this disease process is the accumulation of cholesterol-filled plaque inside arteries. Plaque can inhibit blood flow through an artery.

The effect on health depends on what tissue or organ the plaque-damaged artery nourishes. Plaque in a coronary artery can cause angina (chest pain with exercise or stress) or a heart attack. In an artery in the brain, it can cause memory loss, dementia, or stroke. As described in Erectile Dysfunction, a Special Health Report from Harvard Medical School, atherosclerosis in arteries supplying the penis can prevent the increase in blood flow needed to start or sustain an erection.

In fact, blood vessel problems are the leading cause of erectile dysfunction. That’s why Harvard’s Dr. Michael P. O’Leary, the medical editor of the report, says that erections “serve as a barometer for overall health,” and that erectile dysfunction can be an early warning sign of trouble in the heart or elsewhere.

Fortunately, there are several ways to combat erectile dysfunction. Simple lifestyle changes like losing weight, exercising more, or stopping smoking can help. Viagra and other erectile dysfunction drugs work for some men. Devices and sex therapy can also help.