Learning to predict threat is a fundamental ability of many biological organisms, and a laboratory model for anxiety disorders. Interfering with such memories in humans would be of high clinical relevance. On the basis of studies in cell cultures and slice preparations, it is hypothesised that synaptic remodelling required for threat learning involves the extracellular enzyme matrix metalloproteinase (MMP) 9. However, in vivo evidence for this proposal is lacking. Here we investigate human Pavlovian fear conditioning under the blood-brain barrier crossing MMP inhibitor doxycyline in a pre-registered, randomised, double-blind, placebo-controlled trial. We find that recall of threat memory, measured with fear-potentiated startle 7 days after acquisition, is attenuated by ~60% in individuals who were under doxycycline during acquisition. This threat memory impairment is also reflected in increased behavioural surprise signals to the conditioned stimulus during subsequent re-learning, and already late during initial acquisition. Our findings support an emerging view that extracellular signalling pathways are crucially required for threat memory formation. Furthermore, they suggest novel pharmacological methods for primary prevention and treatment of posttraumatic stress disorder.