Male rats show four to six penile erection episodes when put in the presence of an inaccessible receptive female for 80 min. These noncontact erections occur concomitantly with an increase in nitric oxide production in the paraventricular nucleus of the hypothalamus. This is shown by the increases in the NO2– and NO3– concentrations in the paraventricular dialysate obtained from these males by in vivo microdialysis. The NO2– concentration increased from 0.75 ± 0.10 μm to 2.89 ± 0.39 μm and that of NO3– from 4.13 ± 0.58 μm to 9.5 ± 1.2 μm. Morphine (0.5, 1 and 5 μg), given unilaterally into the paraventricular nucleus 15 min before the introduction of the receptive female, prevented the NO2– and NO3– increases, and noncontact erections, dose-dependently. In contrast, the κ opioid receptor agonist U-69 593 (5 μg) was ineffective. The effects of morphine on NO2– and NO3–, and on noncontact erections, were prevented by the opiate receptor antagonist naloxone (10 μg) injected into the paraventricular nucleus 15 min before morphine. The NO2– and NO3– concentrations were also increased in the paraventricular dialysate of male rats during copulation, i.e. when in copula penile erections occurred. As found with noncontact erections, morphine, but not U-69 593, injected into the paraventricular nucleus prevented the NO2– and NO3– increases and impaired copulatory behaviour, and naloxone prevented these responses when given before morphine. Although some diffusion of the opiate to surrounding brain areas cannot be completely ruled out, the present results suggest that morphine acts through μ receptors in the paraventricular nucleus to impair noncontact erections and copulation. These effects of morphine are apparently mediated by a prevention of the increased nitric oxide production that occurs in the paraventricular nucleus of the hypothalamus of male rats during sexual activity.