Classically, androgens were thought to be linked to sexual activity in man through their action on increased libido. Recently, the sex hormone dependent nature of nitric oxide synthase (NOS), the enzyme system producing the neurotransmitter of erection (nitric oxide) has been reported. Our study evaluated how changes in testosterone levels alter erectile function. In forty-seven rats the erectile response to cavernous nerve electrostimulation was recorded 1, 5, 10, 20 and 30 d post-bilateral orchiectomy, and compared to controls. Penile tissue was subsequently stained for the presence of NOS, using an NADPH diaphorase technique. Forty eight rats were used in part two. After orchiectomy exogenous testosterone was administered and the erectile function as well as density of NOS positive nerve fibers was assessed. All castrated animals showed a rapid decrease in serum free testosterone levels within 24 h. In contrast, a gradual decrease in intracavernous pressure was recorded with cavernous nerve stimulation, proportional to the time post orchiectomy. NADPH diaphorase staining showed a decreased density of nonadrenergic noncholinergic (NANC) nerve fibers innervating the cavernosal tissue proportional to the time post orchiectomy. With reconstitution of the androgen mileu the erectile response returned to near normal values and recovery of NADPH-positive nerve fibers was observed. Based on presented data we conclude that testosterone or a metabolite plays a direct role in erection acting through an effect on nitric oxide synthase within the corpora cavernosa.