BACKGROUNDIn this trial, we previously showed per-oral endoscopic myotomy (POEM) to be non-inferior to laparoscopic Heller's myotomy (LHM) plus Dor fundoplication in managing symptoms in patients with idiopathic achalasia 2 years post-procedure. However, post-procedural gastro-oesophageal reflux was more common after POEM at 2 years. Here we report 5-year follow-up data.METHODSThis study is a multicentre, randomised, open-label, non-inferiority trial performed at eight centres in six European countries (Germany, Italy, Czech Republic, Sweden, the Netherlands, and Belgium). Patients with symptomatic primary achalasia were eligible for inclusion if they were older than 18 years and had an Eckardt symptom score higher than 3. Patients were randomly assigned (1:1; randomly permuted blocks of sizes 4, 8, or 12) to undergo either POEM or LHM plus Dor fundoplication. The primary endpoint was clinical success, defined by an Eckardt symptom score of 3 or less without the use of additional treatments, at 2 years, and was reported previously. Prespecified secondary endpoints at 5 years were clinical success; Eckardt symptom score; Gastrointestinal Quality of Life Index score; lower oesophageal sphincter function by high-resolution manometry; and parameters of post-procedural reflux (reflux oesophagitis according to the Los Angeles classification; pH-metry, and DeMeester clinical score). We hypothesised that POEM would be non-inferior (with a non-inferiority margin of -12·5 percentage points) to LHM plus Dor fundoplication with regards to clinical success. All analyses were performed on a modified intention-to-treat (mITT) population, which included all patients who underwent the assigned procedure. This study is registered with ClinicalTrials.gov (NCT01601678) and is complete.FINDINGSBetween Dec 7, 2012, and Oct 9, 2015, 241 patients were randomly assigned (120 to POEM and 121 to LHM) and 221 had the assigned treatment (112 POEM and 109 LHM; mITT). 5-year follow up data were available for 90 (80%) patients in the POEM group and 87 (80%) patients in the LHM group. Clinical success rate at 5 years was 75·0% (95% CI 66·2 to 82·1) after POEM and 70·8% (61·7 to 78·5) after LHM (difference 4·2 percentage points [95% CI -7·4 to 15·7]). The mean Eckardt symptom score decreased from baseline to 5 years in both groups and the overall difference in mean scores was -0·29 (95% CI -0·62 to 0·05). Change in Gastrointestinal Quality of Life Index scores, as well as in integrated relaxation pressure on manometry, from baseline to 5 years, did not differ significantly between the groups. At 5 years, 26 (41%) of 63 patients after POEM and 18 (31%) of 58 patients after LHM had reflux oesophagitis (difference 10·2 percentage points [95% CI -7·0 to 26·8]). Significant oesophagitis (Los Angeles classification grade B, C, or D) was observed in nine (14%) of 63 patients after POEM and in four (7%) of 58 patients after LHM. pH-metry was performed in 81 (37%) of 221 patients, with higher mean acid exposure time for POEM (10·2% [95% CI 7·6 to 14·2]) than for LHM (5·5% [3·1 to 11·8]). Significantly more patients in the POEM than in the LHM group had abnormal acid exposure time at 5 years (>4·5%; 28 [62%] of 45 vs 11 [31%] of 36; difference 31·7 percentage points [95% CI 9·8 to 50·5]). The presence of reflux symptoms at 5 years was similar in both groups, with a mean DeMeester clinical score of 1·3 (95% CI 1·0 to 1·6) after POEM and 1·1 (0·9 to 1·4) after LHM. The complications of peptic stricture, Barrett's oesophagus, and oesophageal adenocarcinoma were not reported.INTERPRETATIONOur long-term results support the role of POEM as a less invasive myotomy approach that is non-inferior to LHM in controlling symptoms of achalasia. Gastro-oesophageal reflux was common in both groups, but with a tendency towards higher rates in the POEM group. Thus, patients should be provided with the advantages and disadvantages of each approach in decision making.FUNDINGEuropean Clinical Research Infrastructure Network, Hamburgische Stiftung für Wissenschaften, Entwicklung und Kultur Helmut und Hannelore Greve, Dr med Carl-August Skröder Stiftung, Dr Gerhard Büchtemann Stiftung, Agnes-Graefe Stiftung, Georg und Jürgen Rickertsen Stiftung, Reinhard Frank Stiftung, Johann Max Böttcher Stiftung, Richard und Annemarie Wolf Stiftung, Olympus Europa, German Society for Gastroenterology and Metabolism and Olympus Europe Foundation, United European Gastroenterology Week, Olympus EuroNOTES Research Fund Program, Harvard Catalyst, the Harvard Clinical and Translational Science Center, and Harvard University and its affiliated academic health-care centres.