Repetitive transcranial magnetic stimulation (rTMS) has been proposed to treat neuropathic pain but the quality of evidence remains low. We aimed to assess the efficacy and safety of neuronavigated rTMS to the motor cortex (M1) or dorsolateral prefrontal cortex (DLPFC) in neuropathic pain over 25 weeks. We did a randomised double-blind, placebo-controlled trial at four outpatient clinics in France. Patients aged 18-75 years with peripheral neuropathic pain were randomly assigned in a 1:1 ratio to M1 or DLPFC-rTMS and re-randomised in a 2:1 ratio to active or sham rTMS (10 Hz, 3000 pulses/session, 15 sessions over 22 weeks). Patients and investigators were blind to treatment allocation. The primary endpoint was the comparison between active M1-rTMS, active DLPCF-rTMS and sham-rTMS for the change over the course of 25 weeks (group by time interaction) in average pain intensity (from 0 no pain to 10 maximal pain) on the Brief Pain Inventory (BPI), using a mixed model repeated measures analysis in patients who received at least one rTMS session (modified ITT population). Secondary outcomes included other measures of pain intensity and relief, sensory and affective dimensions of pain, quality of pain, self reported pain intensity and fatigue (patients diary), patient and clinician global impression of change (PGIC, CGIC), quality of life, sleep, mood and catastrophizing. This study is registered with ClinicalTrials.gov NCT02010281. A total of 152 patients were randomised and 149 received treatment (49 for M1; 52 for DLPFC; 48 for sham). M1-rTMS reduced pain intensity versus sham-rTMS (estimate for group x session interaction: -0.048 ± 0.02; 95% CI: -0.09 to -0.01; p = 0.01). DLPFC-rTMS was not better than sham (estimate: -0.003 ± 0.01; 95% CI:-0.04 to 0.03, p = 0.9). M1-rRMS, but not DLPFC-rTMS, was also superior to sham-rTMS on pain relief, sensory dimenson of pain, self reported pain intensity and fatigue, PGIC and CGIC. There were no effect on quality of pain, mood, sleep and quality of life as all groups improved similarly over time. Headache was the most common side effect and occurred in 17 (34.7%), 23 (44.2%) and 13 (27.1%) patients from M1, DLPFC and sham groups respectively (p = 0.2). Our results support the clinical relevance of M1-rTMS, but not of DLPFC-rTMS, for peripheral neuropathic pain with an excellent safety profile.