What Makes the Penis Hard: Blood, Nerves & Hormones

An erection happens when blood fills two spongy chambers inside the penis and gets trapped there under pressure. The process involves your brain, nerves, blood vessels, and hormones all working together in a specific sequence. It looks simple from the outside, but the internal mechanics are surprisingly complex.

The Two Chambers That Fill With Blood

Running the length of the penis are two tube-shaped structures called the corpora cavernosa. They’re made of connective tissue, smooth muscle, and a network of hollow spaces, similar to a sponge. When those hollow spaces fill with blood, the penis becomes firm and elongated. A tough outer membrane wraps around both chambers, and this membrane plays a critical role: as blood fills the spongy tissue inside, the expanding chambers press outward against it. That compression squeezes the veins that would normally drain blood back out of the penis, effectively trapping the blood inside. This trapping mechanism is what creates and maintains rigidity.

Think of it like pinching a garden hose while the water is still flowing in. Blood keeps arriving through the arteries, but the exit routes are squeezed shut. Internal pressure builds, and the tissue becomes stiff.

The Chemical Chain Reaction

The signal that kicks everything off is a molecule called nitric oxide, released by nerves and blood vessel walls inside the penis during arousal. Nitric oxide triggers a chain reaction: it activates an enzyme that produces a second chemical messenger (a molecule called cGMP), and this messenger tells the smooth muscle cells lining those spongy chambers to relax. When the muscle relaxes, the hollow spaces open wide, arteries dilate, and blood rushes in.

Without nitric oxide, this chain doesn’t start. Without cGMP, the muscles don’t relax. Research in mice that were genetically unable to produce the protein activated by cGMP showed severe erectile dysfunction, confirming that this single pathway is the core mechanism. It’s also the reason medications for erectile dysfunction work the way they do: they block the enzyme that breaks down cGMP, keeping levels high so the muscles stay relaxed longer.

How Your Brain and Nerves Start the Process

Erections can start in two fundamentally different ways. The first is psychogenic, meaning it originates in the brain. Visual cues, fantasies, sounds, or even a passing thought can trigger arousal signals that travel down the spinal cord and into the nerves of the penis. No single brain region controls this. Multiple areas contribute, from parts of the cerebral cortex (involved in thought and perception) to the hypothalamus, which helps regulate basic drives like hunger, aggression, and sexual behavior. A cluster of neurons in the hypothalamus appears especially important. When researchers stimulated this area in animal studies, it reliably produced erections.

The second type is reflexogenic, triggered by direct physical touch to the genitals. These signals travel to the spinal cord and can produce an erection without any input from the brain at all. Evidence for this comes from observations of soldiers with spinal cord injuries, who could still get erections from physical stimulation even when the connection between the brain and lower body was severed.

Regardless of the source, the nervous system operates through a balance of two opposing forces. The parasympathetic branch (sometimes called the “rest and digest” system) promotes erections by releasing nitric oxide and other excitatory chemicals. The sympathetic branch (the “fight or flight” system) tends to inhibit them. When the sympathetic system quiets down, erections happen more easily. This balance explains why stress and anxiety can make erections difficult, and why relaxation supports them.

What Testosterone Actually Does

Testosterone doesn’t directly cause erections, but it maintains the machinery that makes them possible. At a cellular level, testosterone supports the production of nitric oxide in penile tissue. When testosterone levels drop, the enzyme responsible for producing nitric oxide becomes less active, which means less cGMP gets made and the smooth muscle doesn’t relax as effectively. Testosterone also appears to protect the blood vessels in the penis from inflammation and oxidative damage, keeping them responsive over time.

This is why men with significantly low testosterone often experience weaker erections. The arousal signals from the brain may still be working fine, but the tissue itself can’t respond as well because the chemical foundation has weakened.

How an Erection Ends

An erection doesn’t just fade on its own. A specific enzyme actively breaks down cGMP, the molecule keeping the smooth muscle relaxed. As cGMP levels drop, the smooth muscle contracts again, the spongy chambers compress, the veins reopen, and blood drains out. The penis returns to its soft state.

This breakdown enzyme is essential. Without it, erections wouldn’t resolve normally. Research on mice with disrupted versions of this enzyme showed delayed return to a soft state after stimulation ended. The body needs both the “on” switch (nitric oxide and cGMP) and the “off” switch (the breakdown enzyme) to cycle properly.

Why Erections Happen During Sleep

Most healthy men experience three to five erections per night, each lasting 10 to 25 minutes. About 80% of these occur during REM sleep, the phase associated with dreaming. They aren’t caused by sexual dreams. Instead, they appear to be a byproduct of what happens to the nervous system during REM: the sympathetic neurons that normally inhibit erections shut down in a specific area of the brainstem. With that brake released, the parasympathetic system runs unopposed, and erections occur automatically.

These nighttime erections serve a practical medical purpose. If a man has erection difficulties while awake but still gets full, rigid erections during sleep, it strongly suggests the physical plumbing is intact and the issue is more likely psychological. Clinicians sometimes measure nighttime erections to distinguish between physical and psychological causes of erectile problems.

When the Mechanism Breaks Down

Because erections depend on blood vessels, nerves, hormones, and smooth muscle all working together, a problem in any one area can disrupt the whole process. The most common physical cause is vascular: conditions like high blood pressure, diabetes, and atherosclerosis damage the blood vessels or impair the nitric oxide pathway, reducing blood flow into the penis or preventing the trapping mechanism from sealing properly. When the veins can’t be compressed enough to trap blood, the penis may partially fill but never reach full rigidity.

Doctors sometimes use a simple 0 to 4 scale to describe erection quality. A score of 0 means no enlargement at all. A 1 means the penis gets larger but not hard. A 2 means partially hard but not enough for penetration. A 3 means hard enough for penetration but not fully rigid. A 4 is completely hard. Most erection problems involve a shift down this scale rather than a complete loss, which reflects the fact that partial function in the blood flow and nerve pathways can still produce partial results.

Nerve damage from surgery, spinal injuries, or conditions like diabetes can also interrupt the signals that release nitric oxide in the first place. And psychological factors, including performance anxiety, depression, and chronic stress, can keep the sympathetic nervous system activated, overriding the parasympathetic signals that would otherwise start the process.