Most men have problems with erections from time to time. But some men have erectile dysfunction, or ED. This is when it is hard to get or keep an erection that’s firm enough for sexual intercourse.

If you have ED, you may think that testosterone treatment will help. Testosterone is a male sex hormone. After age 50, men’s levels of testosterone slowly go down and ED becomes more common. But unless you have other signs and symptoms of low testosterone, you should think twice about the treatment. Here’s why:

Testosterone treatment is not necessarily helpful for ED.

Testosterone treatment does not improve erections in men with normal testosterone levels. And studies show that it does not always help men with low testosterone levels if ED is their only symptom.

ED usually has other causes.

ED is usually caused by low blood flow to the penis or a problem with the nerves that control erections. This is a result of other conditions, such as hardening of the arteries, high blood pressure, and high cholesterol or diabetes. These conditions narrow the blood vessels and reduce blood flow to the penis or damage the erectile nerves.

Low testosterone may affect the desire for sex, but it usually does not cause ED.

Testosterone treatment has many risks.

Testosterone treatment can cause the body to retain too much fluid. It can also cause acne, an enlarged prostate, and enlarged breasts. Other side effects include lower fertility; an increase in the number of red blood cells, which can lead to heart disease; an increase in sleep apnea symptoms; and a higher risk of prostate cancer growing faster.

Women and children should avoid touching unwashed or unclothed areas of skin where a man has applied testosterone gel. The gel can be transferred through skin contact.

When should you consider testosterone treatment for ED?

If you’ve had trouble having erections for three months, talk to your health care provider. Your health care provider will ask about all your symptoms and give you a physical exam.

Symptoms or signs of low testosterone can include less of a sex drive, loss of body hair, breast growth, needing to shave less often, a drop in muscle size and strength, and bones that break more easily. In some cases the testicles may be found to be smaller.

If you have some of these symptoms, your health care provider may have you get a blood test to measure your testosterone levels. The blood test should be done more than once. It is best to do it in the morning when testosterone levels are highest.

If the tests show that you have low testosterone levels, your health care provider should look for possible causes. For example, the low levels might be caused by a problem in the pituitary glands.

If no other cause is found, you can try testosterone treatment.

Most erection problems can be treated. Talk with your health care provider about these steps:

Look for medical causes. ED can be an early warning sign of a more serious condition, such as heart disease, high blood pressure, or diabetes. Treating that condition can improve your overall health and your erections.

Review your medicines. ED can be a side effect of many medicines, including those to treat high blood pressure, depression, anxiety, heartburn, allergies, pain, seizures, and cancer. If medicine is the cause of your ED, your health care provider may be able to change the dose you take or switch you to another medicine.

Make lifestyle changes. Unhealthy habits can affect ED. Exercise regularly, lose extra weight, stop smoking, drink less, and do not abuse drugs.

Consider a medicine to boost erections. Certain medicines increase blood flow to the penis if taken an hour before sexual activity. They are sildenafil (Viagra), vardenafil (Levitra), and tadalafil (Cialis). Talk with your health care provider about the benefits and risks of these medicines. You should not take them if you take a nitrate medicine, such as nitroglycerin pills for heart problems. The combination can cause a sudden drop in blood pressure.

Get help for emotional distress. Usually ED has a physical cause that can be treated. But depression, performance anxiety, and relationship problems can cause ED or make it worse. Counseling, alone or with your partner, may be helpful. Your health care provider can refer you to a specialist.