Sexual health is important at any age. Intimacy is a key part of any romantic relationship. But for many men age 65 and over, sex is becoming just a memory.

Low sex drive or an inability to perform — or both — can put a strain on one’s self-esteem as well as on one’s relationship, no matter how healthy it otherwise may be.

But it doesn’t have to be that way. Sex can still be fulfilling as men age.

“The good news is that as men get older, they can still live full, active lives,” says Dr. Abraham Morgentaler, urologist at Beth Israel Deaconess Medical Center and Director of Men’s Health Boston. “Today, 65 is the new 55, or even 45. We’re healthier thanks to nutrition, exercise and medicine. There are a lot of guys who are healthy and active into their older years.”

Still, many are having difficulty with sex.

One study showed that half of men between the ages of 40 and 70 were having some difficulty performing sexually. For those over 65, the rate was about two-thirds. About one-third could not perform at all.

Dr. Morgentaler says it doesn’t have to be that way.

The first thing that aging men should pay attention to in order to keep having a healthy sex life is their overall health. Diabetes, high blood pressure, high cholesterol and smoking can make it difficult for men to have erections.

“If men have any kind of medical issues, their rate of erectile dysfunction is going to be even higher,” he says. “Anything that is bad for the blood vessels is bad for erections.”

So men must be vigilant in keeping problems such as diabetes, blood pressure and cholesterol under control, he says.

If sexual problems remain, there are other options, including the popular drugs, such as Viagra, Levitra and Cialis, to help with erections by boosting blood flow to the sexual organs.

“But they only work in about two-thirds of men,” says Dr. Morgentaler. The success rate is lower for men with diabetes or those who have been treated for prostate cancer.

But the problem may not lie just with blood flow. It just as likely may be caused by low levels of testosterone, the male hormone.

“Around 30 percent of men ages 65 and over will have low levels of testosterone and will have symptoms from it, including erectile dysfunction, less desire, loss of sensation, and difficulty achieving orgasm,” he says.

In addition, low testosterone may result in fatigue, depression and irritability. “The grumpy old man syndrome,” he calls it.

All of these problems may be eliminated by testosterone supplementation, according to Dr. Morgentaler. There are several ways to take it, including the daily administration of a gel to the skin, the placing of a pellet into the buttocks every three to four months or injections every week or two. The pellets are the most popular form in his practice, he says, though most patients around the country use gel.

In some cases, the testosterone alone will fix the problem. In others, it will allow the ED pills to work.

For many years, the idea of testosterone supplementation has been controversial, as it has been thought that it could raise the risk of getting prostate cancer. Patients with prostate cancer or with a history of prostate cancer have been strictly warned of using testosterone as it has been thought that testosterone fueled the growth of prostate cancers.

But Morgentaler has been leading a movement that questions that long-standing hypothesis. A number of recent studies have also raised doubts about the idea. One looked at prostate cancer rates and testosterone levels and found no association.

A study he led gave testosterone to a small number of men with prostate cancer and none showed any cancer progression.

The results suggest that testosterone may well be safe for the general male population and perhaps even for those with prostate cancer, he says. According to the National Cancer Institute, 16 percent of men will be diagnosed with prostate cancer in their lifetimes. An autopsy study found that 70 percent of men in their 60s had prostate cancer, even though it had never been diagnosed in them.

“The sun is shining, the day is new and the field of (prostate cancer) is full of exciting research opportunities, including the possibility that testosterone might actually be beneficial to men with prostate cancer,” Dr. Morgentaler wrote in a recent editorial in the journal European Urology.

If so, aging men — even those with prostate cancer — may be able to enjoy satisfying sex lives well into old age.