To date, only a few studies have examined whether executive dysfunctions in obsessive-compulsive disorder (OCD) are state or trait dependent and almost none of these studies have used functional neuroimaging techniques. We conducted a functional MRI study before and after 12 weeks of pharmacological treatment in 14 psychotropic-free patients with OCD without comorbidity. Subjects performed a spatial variant of a working memory task with four increasing levels of difficulty (n-back task). Responders and non-responders did not differ in clinical and demographical characteristics or brain activation patterns before treatment. Performance improved only in responders and was associated with a change in the overall pattern of brain activity during the task. We found no correlations between (changes in) scores on symptom scales, brain activity and performance. Our preliminary findings suggests that spatial working memory deficits in OCD and their functional anatomical correlates, as assessed with a spatial n-back task, are, at least to some extent, state dependent.