How an Erection Works: Blood Flow, Brain & Aging

An erection is a hydraulic event: arteries in the penis rapidly increase blood flow by a factor of several times the resting rate, spongy tissue chambers fill and expand, and a tough outer sheath compresses the veins so blood can’t leave. The result is a rigid, engorged penis. But the process that makes all of this happen starts well before blood flow changes, beginning with signals in the brain or spinal cord that trigger a precise chemical chain reaction.

What Triggers the Process

Erections start through two distinct pathways, and most of the time both work together. The first is psychogenic: something you see, hear, imagine, or remember sends signals from the brain down through the spinal cord to the penis. The second is reflexogenic: direct physical touch to the genitals sends nerve impulses to erection centers in the lower spinal cord (around the sacral segments S2 through S4), which fire signals right back to the penis without needing input from the brain.

This distinction matters in real-world ways. Men with upper spinal cord injuries often retain reflexogenic erections from touch, even though brain signals can’t reach the lower spine. Conversely, men with lower spinal cord damage sometimes keep the ability to get psychogenic erections, because the brain can still send signals through an alternate sympathetic nerve pathway that bypasses the damaged area. In everyday life, both systems reinforce each other: arousal in the brain amplifies the response to touch, and touch reinforces the brain’s arousal signals.

The Brain’s Role in Arousal

A small region at the front of the hypothalamus called the medial preoptic area acts as a central coordinator for sexual arousal. This area integrates sensory input, hormonal status, and motivation into a go or no-go signal. The key neurotransmitter here is dopamine. When dopamine levels rise in this region, it lifts a kind of tonic brake on sexual reflexes, making the body more responsive to erotic stimuli and promoting the nerve signals that lead to erection.

This connection was first noticed clinically when men with Parkinson’s disease, who have depleted dopamine, were given a dopamine precursor to treat their movement symptoms. Many experienced increased libido and improved erections, and the effect wasn’t simply because they could move better. Dopamine release in this brain region increases during exposure to a sexual partner and continues rising during sexual activity itself. Other signals, including testosterone and nitric oxide within the brain, also influence how much dopamine gets released there.

The Chemical Chain Reaction Inside the Penis

Once nerve signals reach the penis through the cavernous nerves, the real mechanical work begins with a single molecule: nitric oxide. Nerve endings and the cells lining blood vessels inside the penis both release nitric oxide, and once blood starts flowing faster, the shear force of that flow triggers even more nitric oxide release from the vessel walls, creating a self-amplifying loop.

Nitric oxide drifts into the smooth muscle cells that line the walls of arteries and the spongy erectile tissue. There, it activates an enzyme that produces a signaling molecule called cGMP. This is the molecule that does the heavy lifting. cGMP opens potassium channels in the muscle cell membranes, which changes the cell’s electrical charge and blocks calcium from entering. Since calcium is what keeps smooth muscle contracted, lowering calcium levels causes the muscle to relax. Arteries widen, and the tiny spaces within the spongy tissue (called sinusoids) open up and fill with blood.

How Blood Gets Trapped

The penis contains two cylindrical chambers of spongy tissue called the corpora cavernosa, running side by side along the length of the shaft. Each one is wrapped in a tough, fibrous sheath called the tunica albuginea. This sheath has a two-layered structure: an inner layer of circular fibers that contain and support the spongy tissue, and an outer layer of longitudinal fibers running from the tip of the penis to the base. Internal columns of tissue act as structural struts between the walls, reinforcing the whole system. Elastic fibers woven through both layers form an irregular lattice that gives the structure both flexibility and strength.

When the spongy tissue expands with blood, the tunica albuginea stretches but quickly reaches its limit. As it stretches taut, it compresses the small veins that normally drain blood out of the penis, pinching them against the rigid sheath. Blood flows in through the arteries but can’t flow out through the veins. This trapping mechanism, sometimes called the veno-occlusive mechanism, is what creates and maintains rigidity. Without a healthy, intact tunica albuginea, this compression doesn’t work properly.

How an Erection Ends

The same chemical pathway that starts an erection also contains the off switch. An enzyme called PDE5, which is naturally present in penile tissue, continuously breaks down cGMP. During arousal, cGMP is being produced faster than PDE5 can destroy it, so smooth muscle stays relaxed and blood stays trapped. When arousal signals from the brain or local nerves diminish, nitric oxide release slows, cGMP production drops, and PDE5 gains the upper hand. cGMP levels fall, calcium floods back into smooth muscle cells, the arteries narrow, the spongy tissue contracts, and the veins reopen. Blood drains, and the penis returns to its soft state.

This is exactly the mechanism that erectile dysfunction medications target. They block the PDE5 enzyme, slowing the breakdown of cGMP so that whatever nitric oxide is being produced has a larger, longer-lasting effect. They don’t create arousal on their own; they amplify the body’s existing chemical response to arousal.

Nighttime Erections and Tissue Health

Erections don’t only happen during sexual arousal. Healthy males experience several erections during sleep, typically three to five per night, occurring during REM sleep phases. These have been documented from intrauterine life through old age and have no connection to dream content.

Their purpose appears to be maintenance. When the spongy tissue fills with blood, it gets a fresh supply of oxygen. Researchers believe this regular oxygenation prevents the buildup of fibrous scar tissue inside the corpora cavernosa. That kind of fibrosis is actually one of the most common structural causes of erectile dysfunction, because scarred tissue can’t expand properly and the veno-occlusive trapping mechanism fails. Nighttime erections essentially keep the erectile tissue in working condition.

Where Testosterone Fits In

Testosterone plays a supporting rather than a starring role. Normal adult testosterone levels are not required for erections to occur. Instead, there appears to be a threshold: once testosterone is above a certain level, additional testosterone doesn’t make erections more frequent, harder, or longer-lasting. Below that threshold, erectile function can decline.

The practical concern is that testosterone drops with age. Free testosterone levels at age 75 are roughly half of what they are at age 25. When researchers measure testosterone in men reporting erectile problems, between 20% and 40% have low free testosterone. Testosterone influences the system at multiple points: it affects dopamine release in the brain’s arousal center, it supports the health of nerve tissue and smooth muscle in the penis, and it maintains libido, which drives the psychogenic pathway.

How Aging Affects the Process

Several parts of this system change with age. Testicular tissue mass decreases, which contributes to declining testosterone. The tubes that carry sperm become less elastic. Sexual responses generally become slower and less intense, meaning it may take longer to achieve a full erection, and the erection may not be as rigid as it once was. The tunica albuginea can lose some of its elastic fiber network over time, reducing its ability to compress veins effectively. Nighttime erections become shorter and less frequent, which may contribute to gradual changes in tissue oxygenation and health.

None of these changes follow a single timeline. During sexual intercourse, the average erection before ejaculation lasts about seven minutes, but this varies widely based on age, stress levels, medications, and alcohol use. An erection can last anywhere from a few minutes to a few hours depending on circumstances. The underlying physiology remains the same across a lifetime; what changes is the efficiency and speed of each step in the chain.