When a man is sexually stimulated, nitric oxide is released in the erectile tissue of the penis. This nitric oxide activates an enzyme called guanylate cyclase, leading to an increase in levels of cyclic guanosine monophosphate (cGMP). Elevated levels of cGMP cause the smooth muscles in the penile blood vessels to relax, allowing blood to flow more freely into the penis, resulting in an erection.