Stress can be a predisposing factor in the development of psychiatric disorders. However, not all individuals develop psychiatric disorders following a traumatic event. An attempt to understand these individual differences has led to a focus on factors that produce resistance. Interestingly, in rats, an experience with escapable tailshock (ES) before inescapable tailshock (IS) prevents the typical anxiety-like behavioral outcomes of IS. This type of resistance has been termed ‘behavioral immunization’, and it depends on activation of the medial prefrontal cortex (mPFC) during ES. However, one outcome of IS that is not anxiety-related is potentiation of morphine conditioned place preference (CPP). The present experiments investigated whether prior ES would block IS-induced potentiation of morphine CPP. Rats received either ES, IS or homecage control treatment on day 1 and then either IS or homecage control treatment on day 2. Twenty-four hours following day 2, rats underwent morphine conditioning, and CPP was subsequently assessed. In a second experiment, rats received ES 3, 14 or 56 days prior to IS to determine the duration of behavioral immunization. In a final experiment, rats were microinjected with the GABAA agonist muscimol (50 ng/0.5 μL) or saline in the mPFC before day 1 of stress. Prior ES blocked IS-induced potentiation of morphine CPP. This immunizing effect of ES lasted for at least 56 days. Additionally, intra-mPFC muscimol during ES prevented behavioral immunization. These results suggest that prior experience with ES activates the mPFC and produces long-lasting neural alterations that block subsequent IS-induced potentiation of morphine CPP.