Abstract Hypoventilation produces hypercapnia which can elevate pain thresholds. Hypercapnia is a potent stressor which releases catecholamines and activates the sympathetic nervous system. Some stressors produce analgesia by releasing endogenous opioids. To determine the roles of endogenous opioids and catecholamines in hypercapnic analgesia, we administered CO 2 in the inspired gas mixture to conscious rats. CO 2 in the range 5–10% elevated tail flick and leg flexion latencies 2- to 3-fold in both intact and spinalised animals. The effects on reflex latencies but not on p aCO 2 or pH a were blocked by naloxone (2 mg/kg), and were not present in morphine-tolerant animals. The effects were reduced by dexamethasone but were not changed either by adrenalectomy or by systemic guanethidine, propanolol or phentolamine. Hypercapnia delayed the onset of the late phase of behavioural responses to formalin injected into the plantar surface of the hindpaw. We conclude that moderate hypercapnia powerfully depresses flexor withdrawal responses to noxious stimuli, by a mechanism involving release of endogenous opioids but not systemic catecholamines. This effect may account in part for the elevation in pain threshold during hypoventilation.