An erection is a hydraulic event: the penis fills with blood, and that blood gets trapped there. But the chain of events that makes it happen starts well before blood flow changes. It begins with signals from the brain or direct physical touch, travels through the nervous system, and triggers a precise chemical reaction in the blood vessels of the penis. Here’s how the whole process works, step by step.
Two Types of Signals Start the Process
There are two distinct pathways that can trigger an erection, and in most men, they work together at the same time.
The first is psychogenic, meaning it starts in the brain. Visual cues, sounds, fantasies, or even memories of a sexual experience activate areas deep in the brain that release dopamine and oxytocin. Dopamine turns on pro-erectile pathways, while oxytocin activates nerve signals that travel from the brain down through the spinal cord to the penis. This type of erection can happen without any physical touch at all.
The second is reflexogenic, meaning it comes from direct physical stimulation of the penis. Touch sends sensory signals through a nerve called the pudendal nerve to an “erection center” in the lower spinal cord. Those incoming signals activate parasympathetic neurons, which fire erection-inducing signals straight to the penile blood vessels. This type can occur without any arousal in the brain, which is one reason erections sometimes happen in situations that aren’t sexual.
Regardless of which path starts things off, the endpoint is the same: excitatory nerves in the penis release a chemical called nitric oxide.
What Nitric Oxide Does Inside the Penis
Nitric oxide is the key molecule that makes an erection physically happen. It’s produced by both nerve endings and the lining of blood vessels within the penis. Once released, it kicks off a rapid chemical chain reaction.
Nitric oxide activates an enzyme that produces a signaling molecule called cGMP. This molecule tells the smooth muscle cells lining the arteries and spongy tissue of the penis to relax. When those muscles relax, the arteries widen and blood rushes in. The penis contains two cylinder-shaped chambers of spongy tissue that fill with this incoming blood, much like a sponge soaking up water.
Research measuring blood flow during this process found that blood flow inside these spongy chambers jumps from about 9 ml per minute (per 100 grams of tissue) to 44 ml per minute, roughly a fivefold increase.
How Blood Gets Trapped
Filling with blood is only half the equation. For an erection to stay firm, that blood has to be held in place. This is where the architecture of the penis becomes important.
Surrounding the spongy chambers is a tough, fibrous sheath. As the chambers expand with blood, they press outward against this sheath. Small veins that normally drain blood out of the penis run between the spongy tissue and this outer layer. When the tissue expands, those veins get physically compressed, like stepping on a garden hose. This dramatically reduces blood leaving the penis.
Studies measuring this effect found that blood flow in the space just beneath the outer sheath drops from about 22 ml per minute to just 8 ml per minute during an erection. So blood is flooding in faster while simultaneously draining out slower. That combination of increased inflow and restricted outflow is what creates and maintains rigidity.
How the Erection Ends
The penis returns to a soft state when an enzyme called PDE5 breaks down cGMP, the signaling molecule that was keeping the smooth muscles relaxed. PDE5 is the dominant enzyme responsible for clearing cGMP from penile tissue. Once cGMP levels drop, the smooth muscles contract again, arteries narrow, blood flow slows, the compressed veins reopen, and blood drains out. This is also why common erectile dysfunction medications work: they block PDE5, allowing cGMP to persist longer and keeping the erection going.
The Brain’s Built-In Brake System
Your brain doesn’t just have an accelerator for erections. It also has a brake. A cluster of neurons in the hindbrain sends signals down to the erection-generating neurons in the lower spinal cord and releases serotonin, which actively suppresses erections by opposing the effects of dopamine and oxytocin. This is why stress, anxiety, and certain antidepressant medications that raise serotonin levels can make erections harder to achieve. The balance between these excitatory and inhibitory signals determines whether an erection occurs in any given moment.
Erections During Sleep
Healthy men typically experience erections during REM sleep cycles throughout the night, with as many as five episodes per night lasting up to 20 or 30 minutes each. These nocturnal erections aren’t driven by sexual dreams. They appear to be the body’s way of oxygenating penile tissue and maintaining the health of the erectile mechanism. Waking up with an erection is simply a matter of timing: your alarm caught you at the tail end of a REM cycle.
Testosterone’s Role
Testosterone doesn’t directly cause erections, but it sets the stage for them. It maintains the sensitivity of penile tissue to nitric oxide, supports the nerve pathways involved, and drives the libido that initiates psychogenic arousal in the first place. Clinical research defines low testosterone as levels below 300 ng/dL, and men in that range are more likely to experience erectile difficulties. The target range for restoring normal function in clinical studies is typically 500 to 1,000 ng/dL, the upper half of the normal range for young, healthy men.
Testosterone levels naturally decline with age, which is one reason erections tend to become less reliable over time. But testosterone is just one piece of the puzzle. Healthy blood vessels, functioning nerves, and the right balance of brain chemistry all have to be working together.
How Alcohol Disrupts the Process
Alcohol interferes with erections at multiple points in the chain. It dampens the brain signals needed to initiate arousal, and it specifically inhibits the parasympathetic nervous system, the branch of the nervous system responsible for relaxing the smooth muscle in the penis. On top of that, alcohol dilates blood vessels throughout the body, which can cause a temporary drop in blood pressure that prevents adequate blood from reaching the penis. So even if the brain sends the right signals, the plumbing may not cooperate. Occasional moderate drinking may have minimal effects, but heavier consumption reliably disrupts erectile function in the short term and can cause lasting damage over time.

