Resisting a compulsion means sitting with discomfort instead of acting on it, and letting the urge pass on its own. That sounds simple, but compulsions exist precisely because they offer immediate relief from distress, which makes them incredibly hard to interrupt. The most effective approach, supported by decades of clinical evidence, is a structured method called Exposure and Response Prevention (ERP), often combined with mindfulness-based techniques that change your relationship to the urge itself.
Why Compulsions Feel So Hard to Stop
Compulsions are driven by a loop between the brain’s decision-making areas and deeper structures involved in habit formation. When you feel anxious or distressed, your brain generates an urge to do something, anything, that will make the feeling stop. Performing the compulsion brings temporary relief, which reinforces the loop. Over time, this cycle becomes so automatic it can feel like the compulsion is happening to you rather than being chosen by you.
This is different from an impulsive act. Impulsive behaviors are spontaneous and usually driven by the pursuit of pleasure or excitement. Compulsions are repetitive, driven by the need to reduce distress, and most people who experience them recognize that the behavior doesn’t make logical sense. That awareness is part of what makes compulsions so frustrating: you can see the pattern clearly and still feel unable to break it. The core difficulty isn’t willpower. It’s that the brain’s ability to shift attention and switch away from a behavior is impaired, leading to rigid, perseverative patterns that keep the compulsion going.
Exposure and Response Prevention: The Core Method
ERP is the first-line treatment for compulsive behavior, particularly in OCD. The concept is straightforward: you deliberately face a trigger that would normally set off a compulsion, then you resist performing the compulsion. Over repeated practice, the distress that drives the compulsion weakens because your brain learns that nothing catastrophic happens when you don’t act on it.
In practice, ERP follows a progression. A therapist helps you map out your triggers, obsessions, and compulsions, then ranks them from least to most distressing. You start with situations that produce moderate anxiety, not the most terrifying scenario on your list. An early exercise might involve touching a surface and not washing your hands, or noticing that something is out of place and leaving it there. After each exposure, you and your therapist process what happened and how you managed the discomfort. Between sessions, you practice the same skills on your own, gradually working up to more challenging triggers.
About 50 to 60 percent of people who complete a full course of ERP show clinically significant improvement, and roughly two-thirds experience meaningful symptom reduction. Around one-third reach a point considered full recovery. Treatment gains tend to hold: many people maintain their improvement for two or more years after treatment ends. Those numbers also mean that not everyone responds fully, and some people remain symptomatic. But for most, ERP produces the strongest and most lasting results of any available approach.
Techniques You Can Use in the Moment
When a compulsive urge hits, several strategies can help you ride it out without giving in.
Urge Surfing
This mindfulness technique treats the urge like a wave: it builds, peaks, and eventually fades. When you feel the compulsion rising, start by anchoring yourself with a few slow breaths. Then shift your attention toward the urge itself. Notice where you feel it in your body. Notice the thoughts and emotions attached to it. The key is to observe all of this with curiosity rather than trying to fight it or push it away. Some people find it helpful to visualize themselves floating on the ocean, watching the wave build and crest and dissolve. The urge will feel intense for a stretch, typically peaking within 15 to 30 minutes, and then it loses power. Each time you let an urge pass without acting on it, the next one tends to be slightly weaker.
Cognitive Defusion
This technique, drawn from Acceptance and Commitment Therapy, changes how you relate to the thoughts behind a compulsion. Instead of treating the thought as a command (“I need to check the lock again or something terrible will happen”), you learn to see it as a passing mental event, not a truth that requires action. One practical way to do this: when a compulsive thought appears, silently label it. “I’m having the thought that I need to check the lock.” That small reframe creates distance between you and the thought, which loosens its grip.
Delay and Redirect
If fully resisting feels impossible, start by delaying. Tell yourself you’ll wait five minutes before performing the compulsion. During that window, do something that requires active attention: a brief physical task, a conversation, a puzzle. Often the intensity of the urge drops enough during the delay that you can extend it further. Over time, you stretch the delay until the compulsion loses its urgency altogether. This approach works well as a bridge for people who are early in treatment and not yet ready for full response prevention.
What’s Happening in Your Brain
The compulsion loop runs through circuits that connect the brain’s frontal cortex (where planning and decision-making happen) to the striatum (a deeper structure involved in habits and movement). Dopamine, the chemical messenger most associated with motivation and reward, plays a central role in reinforcing this loop. When you perform a compulsion and feel relief, dopamine signals strengthen the connection, making the behavior more automatic next time.
Two populations of neurons in the striatum pull in opposite directions. One group supports continuing or repeating a current action. The other group supports switching to a different action or stopping altogether. In people with compulsive behavior, this balance is disrupted, with the “keep going” signal overpowering the “switch” signal. ERP and mindfulness-based techniques work, in part, by strengthening the brain’s ability to engage that switching mechanism. Each time you successfully resist a compulsion, you’re not just white-knuckling through discomfort. You’re actively retraining the circuit.
The Role of Medication
Medications that increase serotonin activity are commonly prescribed for compulsive behavior and are effective on their own. However, the evidence for combining medication with ERP-based therapy is more nuanced than you might expect. Medication has not been shown to produce a clear synergistic benefit when added to therapy. In one study examining an experimental augmentation strategy for ERP, patients who were already on antidepressants actually had lower remission rates (24 percent) compared to those who were antidepressant-free (60 percent). This doesn’t mean medication is harmful in all cases, but it does suggest that therapy alone is a powerful option, and that medication decisions should be individualized rather than assumed to be automatically helpful.
Keeping Compulsions From Coming Back
Resisting compulsions is not a one-time accomplishment. The urges can resurface during stressful periods, life transitions, or when you encounter a trigger you haven’t practiced with. A solid maintenance plan has three components. First, anticipate your triggers. You already know what sets off your compulsions; keep a mental or written list so you’re not caught off guard. Second, learn to recognize early signs of relapse. This might be subtle avoidance behaviors, increased anxiety about specific situations, or the return of repetitive thoughts that had quieted down. Third, have an action plan ready. Know exactly what you’ll do if symptoms reemerge: which ERP exercises to revisit, which mindfulness techniques to use, and at what point to reconnect with a therapist.
Addressing residual symptoms matters too. If you finish a course of therapy but still have mild compulsions in certain areas, those leftover patterns can serve as a foothold for relapse. Working on them before you end treatment, even if they seem minor, strengthens your long-term stability.

