The recreational drug 3,4-methylenedioxymethamphetamine (MDMA; 'ecstasy') produces a neuro-inflammatory response in rats characterized by an increase in microglial activation and IL-1β levels. The integrity of the blood-brain barrier (BBB) is important in preserving the homeostasis of the brain and has been shown to be affected by neuro-inflammatory processes. We aimed to study the effect of a single dose of MDMA on the activity of metalloproteinases (MMPs), expression of extracellular matrix proteins, BBB leakage and the role of the ionotropic purinergic receptor P2X7 (P2X7R) in the changes induced by the drug. Adult male Dark Agouti rats were treated with MDMA (10 mg/kg, i.p.) and killed at several time-points in order to evaluate MMP-9 and MMP-3 activity in the hippocampus and laminin and collagen-IV expression and IgG extravasation in the dentate gyrus. Microglial activation, P2X7R expression and localization were also determined in the dentate gyrus. Separate groups were treated with MDMA and the P2X7R antagonists Brilliant Blue G (BBG; 50 mg/kg, i.p.) or A-438079 (30 mg/kg, i.p.). MDMA increased MMP-3 and MMP-9 activity, reduced laminin and collagen-IV expression and increased IgG immunoreactivity. In addition, MDMA increased microglial activation and P2X7R immunoreactivity in these cells. BBG suppressed the increase in MMP-9 and MMP-3 activity, prevented basal lamina degradation and IgG extravasation into the brain parenchyma. A-438079 also prevented the MDMA-induced reduction in laminin and collagen-IV immunoreactivity. These results indicate that MDMA alters BBB permeability through an early P2X7R-mediated event, which in turn leads to enhancement of MMP-9 and MMP-3 activity and degradation of extracellular matrix.