When a passing shadow is presented to the crab (Chasmagnathus granulatus), an escape response is elicited that habituates after repeated stimulation. Results of previous papers suggest that this habituation might be mediated by endogenous opiates, entailing the postulate that opiates may inhibit the response to a danger stimulus. This contention is tested herein. Two trials (T1, T2) of shadow stimulation were given 30 min apart, and the response activity was recorded. In Experiment 1 a range of morphine doses (0, 25, 50, 75, and 100 micrograms/g) were injected into crabs immediately after T1. Analysis of the M response values showed a morphine dose-dependent reduction in the crab's reactivity to the danger stimulus in T2. In Experiment 2, groups of crabs were injected with 1 of 4 solutions; saline, 70 micrograms/g morphine, 70 micrograms/g morphine plus 1.6 micrograms/g naloxone. Results suggest that morphine acts through an opiate receptor to inhibit the crab's response level to a danger stimulus. Three possible mechanisms of the morphine effect are discussed, and the most viable one suggests a central site of action.