Background Chronic pelvic pain affects 2-24% of women worldwide and evidence for medical treatments is scarce. Gabapentin is effective in treating some chronic pain conditions. We aimed to measure the efficacy and safety of gabapentin in women with chronic pelvic pain and no obvious pelvic pathology. Methods We performed a multicentre, randomised, double-blind, placebo-controlled randomised trial in 39 UK hospital centres. Eligible participants were women with chronic pelvic pain (with or without dysmenorrhoea or dyspareunia) of at least 3 months duration. Inclusion criteria were 18-50 years of age, use or willingness to use contraception to avoid pregnancy, and no obvious pelvic pathology at laparoscopy, which must have taken place at least 2 weeks before consent but less than 36 months previously. Participants were randomly assigned in a 1:1 ratio to receive gabapentin (titrated to a maximum dose of 2700 mg daily) or matching placebo for 16 weeks. The online randomisation system minimised allocations by presence or absence of dysmenorrhoea, psychological distress, current use of hormonal contraceptives, and hospital centre. The appearance, route, and administration of the assigned intervention were identical in both groups. Patients, clinicians, and research staff were unaware of the trial group assignments throughout the trial. Participants were unmasked once they had provided all outcome data at week 16-17, or sooner if a serious adverse event requiring knowledge of the study drug occurred. The dual primary outcome measures were worst and average pain scores assessed separately on a numerical rating scale in weeks 13-16 after randomisation, in the intention-to-treat population. Self-reported adverse events were assessed according to intention-to-treat principles. This trial is registered with the ISRCTN registry, ISCRTN77451762. Findings Participants were screened between Nov 30, 2015, and March 6, 2019, and 306 were randomly assigned (153 to gabapentin and 153 to placebo). There were no significant between-group differences in both worst and average numerical rating scale (NRS) pain scores at 13-16 weeks after randomisation. The mean worst NRS pain score was 7•1 (standard deviation [SD] 2•6) in the gabapentin group and 7•4 (SD 2•2) in the placebo group. Mean change from baseline was-1•4 (SD 2•3) in the gabapentin group and-1•2 (SD 2•1) in the placebo group (adjusted mean difference-0•20 [97•5% CI-0•81 to 0•42]; p=0•47). The mean average NRS pain score was 4•3 (SD 2•3) in the gabapentin group and 4•5 (SD 2•2) in the placebo group. Mean change from baseline was-1•1 (SD 2•0) in the gabapentin group and-0•9 (SD 1•8) in the placebo group (adjusted mean difference-0•18 [97•5% CI-0•71 to 0•35]; p=0•45). More women had a serious adverse event in the gabapentin group than in the placebo group (10 [7%] of 153 in the gabapentin group compared with 3 [2%] of 153 in the placebo group; p=0•04). Dizziness, drowsiness, and visual disturbances were more common in the gabapentin group. Interpretation This study was adequately...