Abstract Activation of cannabinoid CB1 and CB2 receptors is known to attenuate nociception and hyperalgesia in somatic inflammatory conditions. The aim of this study was to determine whether cannabinoids modulate colonic sensitivity in basal and inflammatory conditions. The effects of CB1 and CB2 receptor agonists and antagonists on the abdominal contractile response to colorectal distension (CRD) in basal conditions and after 2,4,6-trinitrobenzenesulphonic acid-induced colitis were investigated. As previously described, colitis triggered a hypersensitivity to CRD. In basal conditions, both CB1 (WIN 55212-2) and CB2 (JWH 015) agonists reduced the abdominal response to CRD at a dose of 1 mg kg−1, i.p. Both compounds were active at a lower dose (0.1 mg kg−1) abolishing the hypersensitivity induced by colitis. Administered alone, CB1 (Rimonabant) and CB2 (SR 144528) receptor antagonists (10 mg kg−1) had no effect on basal sensitivity. In contrast, the CB1, but not the CB2, receptor antagonist enhanced colitis-induced hyperalgesia. It is concluded that colonic inflammation enhances the antinociceptive action of CB1 and CB2 receptor agonists, and activates an endogenous, CB1 receptor mediated, antinociceptive pathway.