Cervical dystonia is managed mainly by repeated botulinum toxin injections. We aimed to establish whether pallidal neurostimulation could improve symptoms in patients not adequately responding to chemodenervation or oral drug treatment. In this randomised, sham-controlled trial, we recruited patients with cervical dystonia from centres in Germany, Norway, and Austria. Eligible patients (ie, those aged 18-75 years, disease duration ≥3 years, Toronto Western Spasmodic Torticollis Rating Scale [TWSTRS] severity score ≥15 points) were randomly assigned (1:1) to receive active neurostimulation (frequency 180 Hz; pulse width 120 μs; amplitude 0·5 V below adverse event threshold) or sham stimulation (amplitude 0 V) by computer-generated randomisation lists with randomly permuted block lengths stratified by centre. All patients, masked to treatment assignment, were implanted with a deep brain stimulation device and received their assigned treatment for 3 months. Neurostimulation was activated in the sham group at 3 months and outcomes were reassessed in all patients after 6 months of active treatment. Treating physicians were not masked. The primary endpoint was the change in the TWSTRS severity score from baseline to 3 months, assessed by two masked dystonia experts using standardised videos, analysed by intention to treat. This trial is registered with ClinicalTrials.gov, number NCT00148889. Between Jan 19, 2006, and May 29, 2008, we recruited 62 patients, of whom 32 were randomly assigned to neurostimulation and 30 to sham stimulation. Outcome data were recorded in 60 (97%) patients at 3 months and 56 (90%) patients at 6 months. At 3 months, the reduction in dystonia severity was significantly greater with neurostimulation (-5·1 points [SD 5·1], 95% CI -7·0 to -3·5) than with sham stimulation (-1·3 [2·4], -2·2 to -0·4, p=0·0024; mean between-group difference 3·8 points, 1·8 to 5·8) in the intention-to-treat population. Over the course of the study, 21 adverse events (five serious) were reported in 11 (34%) of 32 patients in the neurostimulation group compared with 20 (11 serious) in nine (30%) of 30 patients in the sham-stimulation group. Serious adverse events were typically related to the implant procedure or the implanted device, and 11 of 16 resolved without sequelae. Dysarthria (in four patients assigned to neurostimulation vs three patients assigned to sham stimulation), involuntary movements (ie, dyskinesia or worsening of dystonia; five vs one), and depression (one vs two) were the most common non-serious adverse events reported during the course of the study. Pallidal neurostimulation for 3 months is more effective than sham stimulation at reducing symptoms of cervical dystonia. Extended follow-up is needed to ascertain the magnitude and stability of chronic neurostimulation effects before this treatment can be recommended as routine for patients who are not responding to conventional medical therapy. Medtronic.