Background: The Thymectomy Trial in Non-Thymomatous Myasthenia Gravis Patients Receiving Prednisone (MGTX) showed that thymectomy combined with prednisone was superior to prednisone alone in improving clinical status as measured by the Quantitative Myasthenia Gravis (QMG) score in patients with generalised non-thymomatous myasthenia gravis at 3 years. We investigated the long-term effects of thymectomy up to 5 years on clinical status, medication requirements, and adverse events. Methods: We did a rater-blinded 2-year extension study at 36 centres in 15 countries for all patients who completed the randomised controlled MGTX and were willing to participate. MGTX patients were aged 18 to 65 years at enrolment, had generalised non-thymomatous myasthenia gravis of less than 5 years' duration, had acetylcholine receptor antibody titres of 1·00 nmol/L or higher (or concentrations of 0·50–0·99 nmol/L if diagnosis was confirmed by positive edrophonium or abnormal repetitive nerve stimulation, or abnormal single fibre electromyography), had Myasthenia Gravis Foundation of America Clinical Classification Class II–IV disease, and were on optimal anticholinesterase therapy with or without oral corticosteroids. In MGTX, patients were randomly assigned (1:1) to either thymectomy plus prednisone or prednisone alone. All patients in both groups received oral prednisone at doses titrated up to 100 mg on alternate days until they achieved minimal manifestation status. The primary endpoints of the extension phase were the time-weighted means of the QMG score and alternate-day prednisone dose from month 0 to month 60. Analyses were by intention to treat. The trial is registered with ClinicalTrials.gov, number NCT00294658. It is closed to new participants, with follow-up completed. Findings: Of the 111 patients who completed the 3-year MGTX, 68 (61%) entered the extension study between Sept 1, 2009, and Aug 26, 2015 (33 in the prednisone alone group and 35 in the prednisone plus thymectomy group). 50 (74%) patients completed the 60-month assessment, 24 in the prednisone alone group and 26 in the prednisone plus thymectomy group. At 5 years, patients in the thymectomy plus prednisone group had significantly lower time-weighted mean QMG scores (5·47 [SD 3·87] vs 9·34 [5·08]; p=0·0007) and mean alternate-day prednisone doses (24 mg [SD 21] vs 48 mg ; p=0·0002) than did those in the prednisone alone group. 14 (42%) of 33 patients in the prednisone group, and 12 (34%) of 35 in the thymectomy plus prednisone group, had at least one adverse event by month 60. No treatment-related deaths were reported during the extension phase. Interpretation: At 5 years, thymectomy plus prednisone continues to confer benefits in patients with generalised non-thymomatous myasthenia gravis compared with prednisone alone. Although caution is appropriate when generalising our findings because of the small sample size of our study, they nevertheless provide further support for the benefits of thymectomy in patients with generalised non-thymomatous myasthenia gravis. Funding: National Institutes of Health, National Institute of Neurological Disorders and Stroke.