To compare scleral buckling surgery (SB) and primary pars plana vitrectomy (PPV) in rhegmatogenous retinal detachments of medium complexity. Prospective randomized multicenter clinical trial (the Scleral Buckling versus Primary Vitrectomy in Rhegmatogenous Retinal Detachment Study), separated into phakic or aphakic/pseudophakic eyes. Patients were enrolled over a 5-year period. There was 1-year follow up in the study, and the primary outcome was assessed at 1 year. Forty-five surgeons (25 centers, 5 European countries) recruited 416 phakic and 265 pseudophakic patients. Completion of follow-up was achieved in 93% of the phakic and 89% of the pseudophakic patients. Scleral buckling surgery with the potential use of multiple sponges, encircling elements, drainage, and intraocular injections. Primary vitrectomy included 3-port vitrectomy with sulfur hexafluoride-air tamponade; additional SB was left to the surgeon's decision. Primary study end point: change in best-corrected visual acuity (BCVA); secondary end points: primary and final anatomical success, proliferative vitreoretinopathy, cataract progression, and number of reoperations. In the phakic trial, the mean BCVA change was significantly (P = 0.0005) greater in the SB group (SB, -0.71 logarithm of the minimum angle of resolution [logMAR], standard deviation [SD] 0.68; PPV, -0.56 logMAR, SD 0.76). In the pseudophakic trial, changes in BCVA showed a nonsignificant difference of 0.09 logMAR. In phakic patients, cataract progression was greater in the PPV group (P<0.00005). In the pseudophakic group, the primary anatomical success rate (defined as retinal reattachment without any secondary retina-affecting surgery; SB, 71/133 [53.4%]; PPV, 95/132 [72.0%]) was significantly better (P = 0.0020), and the mean number of retina-affecting secondary surgeries (SB, 0.77, SD 1.08; PPV, 0.43, SD 0.85) was lower (P = 0.0032) in the PPV group. Redetachment rates were 26.3% (SB; 55/209) and 25.1% (PPV; 52/207) in the phakic trial and 39.8% (SB; 53/133) and 20.4% (PPV; 27/132) in the pseudophakic trial. The study shows a benefit of SB in phakic eyes with respect to BCVA improvement. No difference in BCVA was demonstrated in the pseudophakic trial; based on a better anatomical outcome, we recommend PPV in these patients.