Skip to Main Content

Erectile Dysfunction

Awards & recognition

  • usnews-neurology

    Best hospital in Northern California

  • usnews-urology

    Best in Northern California in urology

  • n1-2x

    in NIH funding for urology research

Causes of ED

ED is most commonly related to aging, but it also has a wide range of psychological, neurological, vascular, hormonal and pharmaceutical causes, and may result from radiation and surgical treatments for prostate and bladder cancer. This table lays out the basics, and more detailed explanations for each cause follow.

Category of ED Conditions associated with ED
  • Depression and anxiety
  • Schizophrenia
  • Performance anxiety
  • Stress
  • Relationship problems
  • Pelvic surgery, injury or radiation
  • Spinal cord injury
  • Diabetic neuropathy
  • Atherosclerosis
  • Peripheral vascular disease
  • Smoking
  • High blood pressure
  • Diabetes
  • Traumatic injury
  • Pelvic surgery, injury or radiation
  • Peyronie's disease
  • Hypogonadism (low testosterone)
  • Hyperprolactinemia (high prolactin)
Drug induced
  • Excessive alcohol consumption
  • Androgen deprivation therapy (use of LHRH agonists, such as Lupron or Zoladex)
  • Antihypertensives (medications that lower blood pressure)
  • Antidepressants
Other conditions associated with ED
  • Aging
  • Diabetes
  • Chronic kidney failure
  • Obesity
  • Heart disease


Aging causes a progressive decline in sexual function even in healthy patients. Studies show that as men age, erections become less turgid (stiff) and the force and volume of ejaculation decrease. Also, with age, more time is needed to achieve another erection after orgasm (the so-called refractory period). Sensitivity to touch decreases over time, as do testosterone levels, and both changes can diminish sexual desire.

While it's not possible to reverse the effects of aging, there's no age at which a person is too old for sex. Men can avoid or at least delay the most severe manifestations of age-associated sexual dysfunction by remaining physically active, sticking to a healthy diet, avoiding weight gain, not using tobacco, and generally doing things that promote heart health.

Cancer treatments

ED is the most common side effect of both surgical and radiation treatments for prostate cancer.

The cavernous nerve bundles – the nerves that drive erection – are located next to the prostate gland. During a radical prostatectomy, these nerves may be injured. In many cases, this results in ED that is permanent, although the degree of dysfunction may be lessened through treatment. Because the prostate makes most of the fluid in semen, patients who have undergone prostatectomy don't experience ejaculation.

Radiation to the prostate, bladder or rectum also can damage the cavernous nerves and lead to problems with erections and ejaculation. These effects usually manifest a few years after treatment. Although ED and absence of ejaculation are common after prostate surgery or radiation, sexual desire and the ability to achieve orgasm are still possible. Doctors may be able to use nerve-sparing approaches in surgery or radiation therapy that can preserve one or both nerve bundles. While the nerve-sparing technique preserves the possibility of penile erections, most patients nevertheless experience a decline in erectile function that may never be completely recovered.

Hormone therapy for prostate cancer (androgen deprivation therapy) can also cause ED. The drop in testosterone reduces libido and can lead to erection difficulties. Whether these effects are reversible is related to the patient's age, degree of sexual function he had before treatment, and length of time on hormone therapy.

Psychological conditions

Depression and performance anxiety both can lead to ED. Depression is associated with decreases in energy, interest in usual activities and libido. Performance anxiety, work stress and strained personal relationships also can affect erectile function in both conscious and subconscious ways.

Neurological conditions

Penile erection depends on an intact nervous system, so any neurological injury or disease can cause ED. Parkinson's disease, Alzheimer's disease, stroke or head injury can lead to ED by affecting the libido or by interfering with the nerve impulses responsible for erections. Spinal cord injuries cause a decrease in erections related to the extent of the injury. Pelvic surgery – such as radical prostatectomy, cystectomy or colectomy – may injure the nerves that control erection. Long-standing diabetes may affect some nerves and lead to ED.

Hormonal changes

Anything that decreases circulating testosterone in the body, including undergoing chemical or surgical castration or hormone therapy for prostate cancer, decreases libido and may make natural erections more difficult.

Vascular damage

A variety of conditions and habits can damage penile blood vessels over time and contribute to ED. These include:

  • High blood pressure
  • High LDL ("bad") cholesterol or low HDL ("good") cholesterol
  • Heart problems
  • Cigarette smoking
  • Diabetes mellitus
  • Pelvic radiation therapy to treat prostate, bladder or rectal cancer
  • Peyronie's disease (scarring with curvature of the penis)
  • Traumatic injury
  • Damage to the penile spongy tissue that results in leaky veins (sometimes associated with aging)

Chronic disease

ED is common in patients with diabetes, cirrhosis (liver scarring), chronic kidney failure and many other chronic medical issues.

Drug effects

Many types of drugs are associated with developing ED. Here are some to be aware of:

  • Certain antidepressants (including Prozac, Zoloft and Paxil) and antipsychotics, especially those that regulate serotonin, noradrenaline or dopamine.
  • Beta-blockers and thiazide agents used to treat high blood pressure.
  • Cimetidine, a drug for acid reflux disease.
  • Heavy alcohol use or chronic alcoholism.
  • Estrogens and drugs with antiandrogenic action, such as ketoconazole and spironolactone, can lead to ED, decreased libido and breast enlargement.
  • Many drugs of abuse, including tobacco, marijuana and narcotics. (See table below.)

Table 7: Drugs associated with ED

Class of drug Drug
  • Clonidine
  • Reserpine
  • Beta-blockers (atenolol, propranolol, metoprolol)
  • Verapamil
  • Guanethidine
  • Ketoconazole (used for fungal infections as well as for prostate cancer treatment)
  • Cyproterone acetate
  • Estrogen
  • Flutamide
  • Finasteride
  • Gonadotropin-releasing hormone (GnRH) agonists (Lupron, Zoladex)
Cardiac drugs
  • Digoxin
  • Gemfibrozil
  • Clofibrate
  • Thiazides (hydrochlorothiazide)
  • Spironolactone
H2 antagonists
  • Cimetidine
  • Ranitidine
  • Tricyclic (migraine)
  • Selective serotonin reuptake inhibitors, or SSRIs (Prozac, Zoloft, Paxil)
  • Phenothiazines
  • Benzodiazepines (Valium, Xanax)
  • Meprobamate
  • Barbiturates
  • Lithium
Other drugs
  • Narcotics
  • Baclofen
  • Nonsteroidal anti-inflammatory drugs, or NSAIDs
  • Tobacco
  • Alcohol
  • Marijuana

Additional information and resources

Mechanisms of penile erection

The cavernous nerves travel from the underside of the penis to the prostate. They regulate blood flow within the penis. In the flaccid state, relatively little blood flows in through the arteries and there is free outflow via the small veins exiting the spongy tissue just under the thick tunica (membrane surrounding the spongy tissue). During erection, the smooth muscle in the penis relaxes while the arteries widen to bring in more blood. This expands the three cylinders of erectile tissue in the penis, thus lengthening and enlarging the penis. The expansion of these cylinders compresses the small veins, reducing the outflow of blood.

The processes of penile erection are driven by the actions of nerves and blood vessels. Hormones, such as testosterone, also play important roles. Finally, a patient's psychological state and the health of his sexual relationship with a partner are critical determinants of sexual response. Stress, anxiety and depression activate the sympathetic nervous system; this is a natural response to any form of stress. However, that response tends to restrict blood flow into the penis and can make erections difficult or impossible. Careful attention to both mental and physical health is important in preserving erectile function.

A normal erection requires the penis to have intact nerves and blood vessel systems. Nerves that travel to the penis include fibers from the autonomic nervous system – the part of the nervous system that functions independently of conscious thought – as well as the somatic nervous system – the part responsible for sensation and contraction of muscles attached to the penis.

The autonomic nervous system controls the smooth muscle in the penis, prostate and urinary sphincter – muscle that is important for initiating erections and facilitating ejaculation. The autonomic nervous system has two parts. The sympathetic division tends to restrict penile blood flow and is important for closing the bladder neck to prevent urine leakage during sex. The parasympathetic division increases penile blood flow and stimulates erection. Coordination of these two components of the autonomic nervous system is critical to sexual response.

Sensory nerves travel to the head and shaft of the penis; these nerves are responsible for conveying sensations (such as touch, temperature and pain) to the brain and may be important for stimulating sexual response.

Motor nerves control contraction of the ischiocavernosus and bulbocavernosus muscles, which are necessary to producing a fully rigid erection and to ejecting semen during ejaculation.

With sexual stimulation, parasympathetic cavernous nerves release chemicals (primarily nitric oxide) that significantly increase blood flow to the penis. The erectile tissue of the penis rapidly fills with blood and expands, becoming firm and erect. With increasing sexual arousal, the somatic nervous system causes the bulbocavernosus and ischiocavernosus muscles of the penis to contract, forcing additional blood into the penis and making it very rigid. At peak sexual arousal, the sympathetic nervous system causes contraction of the prostate and seminal vesicles, leading to emission, which is the deposition of seminal fluid into the urethra. The sympathetic nervous system also makes the bladder sphincter close, preventing the semen from leaking into the bladder. As the amount of fluid builds in the urethra, pressure increases and the sensation of the inevitability of ejaculation is experienced. The bulbocavernosus muscle, which is under control of the somatic nervous system, then contracts and expels the semen forcibly from the urethra. Orgasm normally coincides with ejaculation.

Detumescence, or loss of erection, occurs shortly thereafter, as the nerves that trigger penile erection stop sending those signals.


There are a variety of treatment options available for erectile dysfunction, which will be explained to you by your doctor. Your therapy will depend on the cause of ED, your age, your health and you and your doctor's preferences.

In most cases, an oral medication, such as Viagra, Levitra or Cialis, will be recommended first. Depending on its effectiveness and your tolerance to the medication, other approaches may be tried. In patients who have blood vessel blockage or leakage, microvascular surgery may be recommended. For those who do not respond to non-surgical treatments or are not candidates for surgery, penile prosthesis is an excellent alternative.

It is important to note that it is not necessary to have an erection to have an orgasm. A vibrator or creative and attentive partner can be helpful.

Oral Medications

Viagra, Levitra and Cialis are oral medications that have been approved by the Food and Drug Administration (FDA) for the treatment of ED. They are in pill form and must be taken by mouth.

Since its introduction in 1998, Viagra has become the drug of choice for treating ED. When a man is sexually stimulated, chemicals like nitric oxide are released into the nerve terminals, which cause the penile smooth muscles to relax, helping to foster an erection. A compound called cyclic guanine monophosphate (cGMP) is involved in this process. After an erection occurs, an enzyme called phosphodiesterase-5 (PDE-5) breaks down cGMP and returns the penis to a flaccid state. Viagra works to improve smooth muscle relaxation and erections by blocking the action of PDE-5, which causes an increase in the levels of cGMP in the penis.

Levitra and Cialis have a similar mechanism to Viagra. It is important to note that all oral medications for ED must be followed by sexual stimulation in order to achieve the desired erection.

For more information, please see Oral Medications for Erectile Dysfunction.

Urethral Suppository (MUSE)

Medicated urethral system for erection (MUSE) is often used when oral medications are not effective. This approach uses a small suppository of medication that is placed in the penile uretha without needles. The suppository is then absorbed and helps to produce an erection.

Large studies conducted in Europe and the United States reported that MUSE was effective in 43 percent of men with impotence of varying causes. The major advantage of the therapy is that is applied locally by patients or their partners, and has few side effects. However, the therapy has been shown to cause moderate penile pain and can have inconsistent response rates. Sometimes an adjustable rubber tension ring is applied at the base of the penis and improves results.

Patients using MUSE should have their first application performed in their doctor's office, to prevent complications such as urethral bleeding, decreased blood pressures, and sustained and prolonged erections. In addition, in rare instances, feelings of lightheadedness or decreased blood pressure may occur.

It also is important to note that after inserting the suppository into the penile uretha, sexual stimulation is required to increase blood flow to the penis. Medication should be refrigerated and maximum use is limited to one suppository per day.

Penile Injections

Penile injections are another treatment option for ED when oral medications are ineffective. Although the idea of inserting something into your penis is probably unappealing, thousands of men will testify to the effectiveness and ease of the injections.

In addition to two FDA approved medications called Caverject and Edex, urologists also use a combination of drugs, including papaverine, phentolamine and alprosdid. In most cases, a combination of two or three medications is used for injection. This combination, known as Trimix, allows for a synergistic effect of the three medications, while keeping the dose of each drug low enough to prevent side effects. In addition, the response rate of the Trimix solution is as high as 90 percent.

Men must receive appropriate training and education by their doctor before beginning home injection therapy. The goal of the injection medicine is to achieve an erection that is sustained for sexual intercourse, but not prolonged or painful. The injections must be given in proper amounts with the appropriate technique to minimize the risk of scarring the penis or developing priapism.

For more information on how to use penile injections, please see Patient Guide to Penile Injections.

Vacuum Device

In patients who only have partial erections, and do not respond to other treatments or prefer not to use them, a vacuum device may be helpful. The device consists of a plastic cylinder connected to a pump and a constriction ring. A vacuum pump uses either manual or battery power to create suction around the penis and bring blood into it. A constriction device is then released around the base of the penis to keep blood in the penis and maintain the erection.

A vacuum device can be used safely for up to 30 minutes, which is when the constriction device should be removed. The advantage of a vacuum device is it is relatively inexpensive, easy to use and avoids drug interactions and serious side effects. Potential side effects associated with the vacuum device are temporary and may include penile numbness, trapping the ejaculate and some bruising.

Penile Prosthesis

For men with erectile dysfunction who do not tolerate or respond to other treatments, a penile prosthesis offers an effective, yet more invasive alternative because it requires surgery. Prostheses come in either a semi-rigid form or as an inflatable device. Most men prefer the placement of the inflatable penile prosthesis, which consists of a pump that contains the inflation and deflation mechanism.

Although the placement of the penile prosthesis requires surgery, patient and partner satisfaction rates are as high as 85 percent. However, it is important to note that full penile length might not be restored to the patient's natural erect status.

Placing the prosthesis within the penis requires the use of an anesthetic. A skin incision is made either at the junction of the penis and scrotum, or just above the penis, depending on which prosthesis and technique is used. The spongy tissue of the penis is exposed and dilated; the prosthesis is then sized and the proper device is placed. The inflatable device is placed is the scrotum. The patient can control his erection at will by pushing a button under the skin.

Side effects associated with penile prosthesis include infection, pain and device malfunction or failure. As the nerves that control sensation are not injured, the penile sensation and the ability have an orgasm should be maintained.

Penile Vascular Reconstructive Surgery

Penile venous surgery is recommended only for young men who have ED as result of congenital or traumatic venous leakage of the penis. The procedure is performed to improve the trapping of blood in the penis, improving a man's ability to get and maintain an erection. Penile arterial surgery generally involves bypassing blocked arteries by transferring an artery from behind the abdominal muscle to a penile artery. This creates a path to the penis that bypasses the area of blockage, which is inhibiting blood flow to the penis.

UCSF Health medical specialists have reviewed this information. It is for educational purposes only and is not intended to replace the advice of your doctor or other health care provider. We encourage you to discuss any questions or concerns you may have with your provider.

Recommended reading

Erectile Dysfunction Causes

The greatest medical risk factors for erectile dysfunction include diabetes mellitus, heart disease, and hypertension. Learn more here.

Oral Medications for Erectile Dysfunction

Find a list of oral medications for Erectile Dysfunction (ED) including, viagra, levitra, and cialis and possible side effects and important things to remember.

Where to get care (1)

    Support services

    Patient Resource

    Case Management & Social Work

    Connect with a team that can help you find resources, solve problems and advocate for you during treatment at UCSF.


    Mindfulness-Based Stress Reduction Class

    This eight-week class teaches mindfulness practices that can reduce stress and improve your overall health, such as meditation and body awareness.

    Patient Resource

    Patient Relations

    We welcome feedback about your experience at UCSF Health. Find out how to contact us with comments, questions or concerns.

    Patient Resource

    Spiritual Care Services

    Chaplains representing many faiths are available around the clock to provide support, comfort and counsel to patients, families and caregivers.