An erection is a hydraulic event: nerves signal the blood vessels inside the penis to relax, blood rushes in and becomes trapped under pressure, and the tissue stiffens. The process involves the brain, spinal cord, nerves, blood vessels, and hormones all working in sequence. Here’s how each step unfolds.
Three Ways an Erection Starts
Not every erection begins the same way. The body has three distinct triggering pathways, each using a different entry point into the nervous system.
Psychogenic erections start in the brain. Visual stimulation, sounds, memories, or fantasy activate areas in the hypothalamus, particularly a region that acts as an integration center for sexual response. These signals travel down the spinal cord and engage erection centers located at two levels: one in the lower thoracic and upper lumbar segments, and another in the sacral segments (S2 through S4).
Reflexogenic erections bypass the brain entirely. Direct touch to the genitals sends nerve impulses through the pudendal nerve into the sacral spinal cord. Some of those signals travel upward to register as sensation, but others immediately activate the parasympathetic nerves that supply the penis. This is why erections can occur even in people with certain spinal cord injuries, as long as the lower spinal segments are intact.
Nocturnal erections happen during REM sleep. Brain imaging during REM shows increased activity in the brainstem and parts of the emotional brain, while the prefrontal cortex (the area involved in conscious control and inhibition) quiets down. Most men experience three to five erections per night during these sleep phases, each lasting around 25 to 35 minutes.
The Chemical Cascade Inside the Penis
Regardless of how the signal starts, the same chemical chain reaction produces the erection itself. The penis contains two cylindrical chambers called the corpora cavernosa, filled with spongy tissue made of smooth muscle and small blood-filled spaces called sinusoids. In a flaccid state, this smooth muscle stays contracted, limiting blood flow.
When the parasympathetic nerves fire, nerve endings and the cells lining the blood vessels inside the corpora cavernosa release a gas molecule called nitric oxide. This is the key trigger. Nitric oxide drifts into the nearby smooth muscle cells and switches on an enzyme that produces a signaling molecule called cGMP. Think of cGMP as the “relax” command for the muscle cell.
cGMP activates a chain of events that ultimately lowers the calcium concentration inside the smooth muscle cells. Calcium is what keeps muscle fibers contracted, so when calcium gets pulled back into storage compartments inside the cell and calcium channels close, the muscle relaxes. At the same time, potassium channels open, which changes the electrical charge across the cell membrane and further shuts down calcium entry. The net result is that the smooth muscle in the walls of the arteries and throughout the spongy tissue goes limp, and blood flow into the penis increases several-fold.
How Blood Gets Trapped
Relaxation of the smooth muscle is only half the story. For the penis to become rigid, blood needs to flow in faster than it flows out. The corpora cavernosa are wrapped in a tough, relatively inelastic sheath called the tunica albuginea. As blood fills the expanding sinusoids, the swelling tissue presses the small veins that normally drain blood out of the penis against this outer sheath. Those veins get physically compressed and squeezed shut.
This trapping mechanism is what builds pressure. Internal pressure in the corpora cavernosa rises to an average of about 100 mmHg in most men, roughly matching systolic blood pressure. During the rigid phase, pelvic floor muscles contract and can push pressure even higher, well above arterial levels. The combination of strong inflow, blocked outflow, and muscular compression produces full rigidity.
Blood Supply to the Penis
The main blood supply comes from the internal pudendal artery, which branches into smaller arteries that feed the corpora cavernosa directly. In about one-third of men, an additional artery called the accessory pudendal artery also contributes to penile blood supply. This anatomical variation matters in surgeries like prostate removal, where preserving these vessels can help maintain erectile function afterward.
Testosterone’s Supporting Role
Testosterone doesn’t trigger erections directly, but it keeps the chemical machinery in working order. Normal testosterone levels increase the production of the enzymes that generate nitric oxide in penile tissue. Testosterone also boosts cGMP levels and, importantly, reduces the amount of the enzyme (PDE5) that breaks cGMP down. In other words, adequate testosterone makes the tissue more responsive to sexual signals by ensuring there’s enough nitric oxide available and that the “relax” signal lasts long enough to be effective.
This is one reason why men with significantly low testosterone often experience erectile difficulties even when their blood vessels and nerves are otherwise healthy.
How an Erection Ends
The body has a built-in off switch. An enzyme called PDE5, found in high concentrations in penile tissue, breaks down cGMP into an inactive form. Once cGMP levels drop, calcium floods back into the smooth muscle cells, the muscle contracts again, arterial inflow decreases, and the compressed veins reopen. Blood drains out, and the penis returns to its flaccid state. The sympathetic nervous system, which opposes the parasympathetic “erection” signals, actively promotes this process.
This is also how common erectile dysfunction medications work. They block the PDE5 enzyme, slowing the breakdown of cGMP so that the relaxation signal persists longer. They don’t create an erection on their own. Sexual stimulation still needs to trigger the initial release of nitric oxide; the medication simply amplifies and sustains the response once it begins.
Why the Process Sometimes Fails
Because erections depend on healthy nerves, blood vessels, hormones, and smooth muscle all cooperating, a problem in any one link can disrupt the process. Conditions that damage blood vessel linings, like diabetes, high blood pressure, and high cholesterol, reduce nitric oxide production at the source. Nerve damage from surgery, spinal injury, or conditions like multiple sclerosis can block the signals before they reach the penis. Psychological factors like anxiety or depression can suppress the brain’s initial arousal signals, preventing the cascade from starting at all.
Smoking and a sedentary lifestyle damage the endothelial cells that produce nitric oxide, gradually making the chemical cascade less efficient over years. This is why erectile difficulty is sometimes described as an early warning sign of cardiovascular disease: the same vascular damage that narrows coronary arteries also impairs the smaller penile arteries, often showing up there first because of their smaller diameter.

