In order to determine if the effect of cocaine on the concentration of immunoreactive beta-endorphin (IR-BE) in the anterior pituitary (AP), neurointermediate lobe of the pituitary (NIL) and hypothalamus was modulated by gonadal steroid, the following groups of animals were studied: a) castrated male rats treated with vehicle, b) castrated male rats treated chronically with cocaine (daily for 10 days), c) castrated male rats treated with testosterone propionate (TP) and d) castrated male rats treated with TP and chronically administered cocaine. Only in castrated rats given TP did cocaine induce a significant increase in the concentration of IR-BE in the AP. The concentration of IR-BE in the NIL was increased by cocaine and was not influenced by the presence or absence of TP. Hypothalamic IR-BE remained unchanged in response to cocaine and was decreased by TP. Column chromatography revealed that TP and cocaine interacted to modulate the amount of beta-endorphin relative to beta-lipotropin in the AP. These findings suggest that in the male rat, the effect of cocaine on the concentration of IR-BE in the AP is modulated by the gonadal steroid environment. By contrast, gonadal does not appear to play a role in the effect of cocaine on the concentration of IR-BE in the NIL.