IMPORTANCE Case series suggest favorable results of peroral endoscopic myotomy (POEM) for treatment of patients with achalasia. Data comparing POEM with pneumatic dilation, the standard treatment for patients with achalasia, are lacking. OBJECTIVE To compare the effects of POEM vs pneumatic dilation as initial treatment of treatment-naive patients with achalasia. DESIGN, SETTING, AND PARTICIPANTS This randomized multicenter clinical trial was conducted at 6 hospitals in the Netherlands, Germany, Italy, Hong Kong, and the United States. Adult patients with newly diagnosed achalasia and an Eckardt score greater than 3 who had not undergone previous treatment were included. The study was conducted between September 2012 and July 2015, the duration of follow-up was 2 years after the initial treatment, and the final date of follow-up was November 22, 2017. INTERVENTIONS Randomization to receive POEM (n = 67) or pneumatic dilation with a 30-mm and a 35-mm balloon (n = 66), with stratification according to hospital. MAIN OUTCOMES AND MEASURES The primary outcome was treatment success (defined as an Eckardt score Յ3 and the absence of severe complications or re-treatment) at the 2-year follow-up. A total of 14 secondary end points were examined among patients without treatment failure, including integrated relaxation pressure of the lower esophageal sphincter via high-resolution manometry, barium column height on timed barium esophagogram, and presence of reflux esophagitis. RESULTS Of the 133 randomized patients, 130 (mean age, 48.6 years; 73 [56%] men) underwent treatment (64 in the POEM group and 66 in the pneumatic dilation group) and 126 (95%) completed the study. The primary outcome of treatment success occurred in 58 of 63 patients (92%) in the POEM group vs 34 of 63 (54%) in the pneumatic dilation group, a difference of 38% ([95% CI, 22%-52%]; P < .001). Of the 14 prespecified secondary end points, no significant difference between groups was demonstrated in 10 end points. There was no significant between-group difference in median integrated relaxation pressure (9.9 mm Hg in the POEM group vs 12.6 mm Hg in the pneumatic dilation group; difference, 2.7 mm Hg [95% CI, −2.1 to 7.5]; P = .07) or median barium column height (2.3 cm in the POEM group vs 0 cm in the pneumatic dilation group; difference, 2.3 cm [95% CI, 1.0-3.6]; P = .05). Reflux esophagitis occurred more often in the POEM group than in the pneumatic dilation group (22 of 54 [41%] vs 2 of 29 [7%]; difference, 34% [95% CI, 12%-49%]; P = .002). Two serious adverse events, including 1 perforation, occurred after pneumatic dilation, while no serious adverse events occurred after POEM. CONCLUSIONS AND RELEVANCE Among treatment-naive patients with achalasia, treatment with POEM compared with pneumatic dilation resulted in a significantly higher treatment success rate at 2 years. These findings support consideration of POEM as an initial treatment option for patients with achalasia.