An erection happens when blood fills two spongy chambers inside the penis and gets trapped there under pressure. The process is driven by a chemical called nitric oxide, which relaxes muscle tissue in the penis and opens up blood vessels so blood can rush in. What seems like a simple physical response actually involves a precise chain reaction between your brain, nerves, blood vessels, and hormones.
The Chemical Chain Reaction
Everything starts with nitric oxide. When you become aroused, whether from a physical sensation or a thought, nerve endings in the penis release this molecule. Nitric oxide is a relaxant: it causes the smooth muscle lining the blood vessels and internal chambers of the penis to loosen up. As those muscles relax, the vessels dilate and blood flows in.
Here’s the part researchers find especially important. That rush of blood creates a slight physical stress on the vessel walls, which triggers those walls to produce even more nitric oxide from their own cells. This second wave of nitric oxide relaxes more tissue, which lets in more blood, which triggers more nitric oxide. The process essentially feeds itself in a loop until the penis is fully erect. Arthur Burnett, a urologist at Johns Hopkins, has described this continuous activation from blood vessel walls as a critical piece of the puzzle, not just the initial nerve signal.
How Blood Gets Trapped
The penis contains two cylindrical chambers called the corpora cavernosa, running side by side along its length. These chambers are filled with a network of expandable spaces (like tiny caverns) lined with smooth muscle and blood vessels. In a non-aroused state, the arteries feeding these spaces are coiled and constricted. During arousal, they straighten out and dilate, flooding the chambers with blood.
Surrounding each chamber is a tough, fibrous sheath that doesn’t stretch easily. As blood fills the spongy tissue inside, the expanding chambers compress the small veins that normally drain blood out of the penis against this rigid outer layer. That compression traps blood inside, maintaining the erection. Internal support columns within the chambers act like structural struts, helping the tissue hold its shape under pressure. The whole system works like a hydraulic mechanism: blood in, drainage blocked, pressure maintained.
Two Pathways to the Same Result
Your body can produce an erection through two completely separate nerve pathways. The first is psychogenic: your brain responds to something you see, hear, or imagine, and sends signals down through the spinal cord (at the level of the mid-to-lower back, roughly T11 through L2) to initiate the process. The second is reflexogenic: direct physical touch to the genitals sends signals through a lower section of the spinal cord (S2 through S4) to trigger the same vascular response locally.
These two pathways are independent enough that men with certain spinal cord injuries above the mid-back may lose the ability to get erections from mental arousal but can still respond to direct physical stimulation. In everyday life, both pathways usually work together, with mental arousal and physical sensation reinforcing each other.
The Nervous System’s Role
Erections are controlled by the parasympathetic nervous system, the branch responsible for “rest and digest” functions. This is the same system that slows your heart rate and manages digestion when you’re relaxed. It promotes the release of nitric oxide and the relaxation of smooth muscle that allows blood to flow in.
The opposite branch, the sympathetic nervous system, is what kicks in during stress or fear. It’s responsible for the “fight or flight” response: faster heart rate, deeper breathing, and the suppression of functions your body considers non-essential in a crisis. Erections fall squarely into that non-essential category. When the sympathetic system activates, it actively inhibits the erectile response. This is why anxiety, stress, or nervousness can make it physically difficult to get or maintain an erection, even when there’s nothing structurally wrong. The mechanism isn’t psychological in some vague sense. It’s a direct neurological override.
Erections During Sleep
Healthy men of all ages, from infancy through old age, experience erections during REM sleep. These typically happen three to five times per night and have no connection to dream content. Researchers believe the primary purpose is maintenance: regular engorgement delivers oxygen to the tissue inside the penis, preventing the kind of scarring and fibrosis that can lead to erectile problems over time. Think of it as the body’s way of keeping the hydraulic system in working order.
Where Testosterone Fits In
Testosterone doesn’t directly cause erections, but it sets the stage. It influences sex drive, supports the health of the tissues involved, and plays a role in maintaining the nitric oxide signaling system. Normal levels for adult men range from about 193 to 824 ng/dL, though this varies by lab. Levels naturally decline with age, and when they drop significantly, men often notice reduced desire and weaker erections, not because the vascular system is broken but because the chemical signals driving it are weaker.
What Makes Erections Harder to Achieve
Because erections depend on healthy blood vessels, anything that damages the cardiovascular system can affect erectile function. High blood pressure, diabetes, high cholesterol, and smoking all damage the lining of blood vessels, reducing their ability to produce nitric oxide and dilate properly. Erectile difficulty is often one of the earliest signs of cardiovascular problems, sometimes appearing years before a heart-related diagnosis.
The numbers reflect this. Among men aged 40 to 60, about 16% experience erectile dysfunction. In the 60 to 80 age group, that figure jumps to nearly 57%. The increase isn’t just about aging. It tracks closely with the accumulation of cardiovascular risk factors over a lifetime.
Aerobic exercise has a measurable effect. A review of 11 clinical trials involving over 1,000 men found that those who exercised for 30 to 60 minutes, three to five times a week, doing activities like walking, running, or cycling, saw meaningful improvement in erectile function compared to men who didn’t exercise. The benefit comes from improved blood flow and lower stress levels, both of which directly support the mechanisms that produce erections.
The Refractory Period
After ejaculation, the sympathetic nervous system takes over, constricting blood vessels and allowing blood to drain from the penis. What follows is the refractory period, a window of time during which another erection isn’t possible. In younger men, this can be as short as a few minutes. With age, it lengthens considerably, potentially reaching 24 to 48 hours in older men. This is a normal physiological shift, not a sign of dysfunction.

