No data from randomised controlled trials of metabolic surgery for diabetes are available beyond 5 years of follow-up. We aimed to assess 10-year follow-up after surgery compared with medical therapy for the treatment of type 2 diabetes. We did a 10-year follow-up study of an open-label, single-centre (tertiary hospital in Rome, Italy), randomised controlled trial, in which patients with type 2 diabetes (baseline duration >5 years; glycated haemoglobin [HbA1c] >7·0%, and body-mass index ≥35 kg/m2) were randomly assigned (1:1:1) to medical therapy, Roux-en-Y gastric bypass (RYGB), or biliopancreatic diversion (BPD) by a computerised system. The primary endpoint of the study was diabetes remission at 2 years (HbA1c <6·5% and fasting glycaemia <5·55 mmol/L without ongoing medication for at least 1 year). In the 10-year analysis, durability of diabetes remission was analysed by intention to treat (ITT). This study is registered with ClinicalTrials.gov, NCT00888836. Between April 30, 2009, and Oct 31, 2011, of 72 patients assessed for eligibility, 60 were included. The 10-year follow-up rate was 95·0% (57 of 60). Of all patients who were surgically treated, 15 (37·5%) maintained diabetes remission throughout the 10-year period. Specifically, 10-year remission rates in the ITT population were 5·5% for medical therapy (95% CI 1·0-25·7; one participant went into remission after crossover to surgery), 50·0% for BPD (29·9-70·1), and 25·0% for RYGB (11·2-46·9; p=0·0082). 20 (58·8%) of 34 participants who were observed to be in remission at 2 years had a relapse of hyperglycaemia during the follow-up period (BPD 52·6% [95% CI 31·7-72·7]; RYGB 66·7% [41·7-84·8]). All individuals with relapse, however, maintained adequate glycaemic control at 10 years (mean HbA1c 6·7% [SD 0·2]). Participants in the RYGB and BPD groups had fewer diabetes-related complications than those in the medical therapy group (relative risk 0·07 [95% CI 0·01-0·48] for both comparisons). Serious adverse events occurred more frequently among participants in the BPD group (odds ratio [OR] for BPD vs medical therapy 2·7 [95% CI 1·3-5·6]; OR for RYGB vs medical therapy 0·7 [0·3-1·9]). Metabolic surgery is more effective than conventional medical therapy in the long-term control of type 2 diabetes. Clinicians and policy makers should ensure that metabolic surgery is appropriately considered in the management of patients with obesity and type 2 diabetes. Fondazione Policlinico Universitario Agostino Gemelli IRCCS.