Background Duchenne muscular dystrophy (DMD) is a severe, progressive, and rare neuromuscular, X-linked recessive disease. Dystrophin deficiency is the underlying cause of disease; therefore, mutation-specific therapies aimed at restoring dystrophin protein production are being explored. We aimed to assess the efficacy and safety of ataluren in ambulatory boys with nonsense mutation DMD. Methods We did this multicentre, randomised, double-blind, placebo-controlled, phase 3 trial at 54 sites in 18 countries located in North America, Europe, the Asia-Pacific region, and Latin America. Boys aged 7–16 years with nonsense mutation DMD and a baseline 6-minute walk distance (6MWD) of 150 m or more and 80% or less of the predicted normal value for age and height were randomly assigned (1:1), via permuted block randomisation (block size of four) using an interactive voice-response or web-response system, to receive ataluren orally three times daily (40 mg/kg per day) or matching placebo. Randomisation was stratified by age (<9 years vs ≥9 years), duration of previous corticosteroid use (6 months to <12 months vs ≥12 months), and baseline 6MWD (<350 m vs ≥350 m). Patients, parents and caregivers, investigational site personnel, PTC Therapeutics employees, and all other study personnel were masked to group allocation until after database lock. The primary endpoint was change in 6MWD from baseline to week 48. We additionally did a prespecified subgroup analysis of the primary endpoint, based on baseline 6MWD, which is reflective of anticipated rates of disease progression over 1 year. The primary analysis was by intention to treat. This study is registered with ClinicalTrials.gov, number NCT01826487. Findings Between March 26, 2013, and Aug 26, 2014, we randomly assigned 230 patients to receive ataluren (n=115) or placebo (n=115); 228 patients comprised the intention-to-treat population. The least-squares mean change in 6MWD from baseline to week 48 was −47·7 m (SE 9·3) for ataluren-treated patients and −60·7 m (9·3) for placebo-treated patients (difference 13·0 m [SE 10·4], 95% CI −7·4 to 33·4; p=0·213). The least-squares mean change for ataluren versus placebo in the prespecified subgroups was −7·7 m (SE 24·1, 95% CI −54·9 to 39·5; p=0·749) in the group with a 6MWD of less than 300 m, 42·9 m (15·9, 11·8–74·0; p=0·007) in the group with a 6MWD of 300 m or more to less than 400 m, and −9·5 m (17·2, −43·2 to 24·2; p=0·580) in the group with a 6MWD of 400 m or more. Ataluren was generally well tolerated and most treatment-emergent adverse events were mild to moderate in severity. Eight (3%) patients (n=4 per group) reported serious adverse events; all except one event in the placebo group (abnormal hepatic function deemed possibly related to treatment) were deemed unrelated to treatment. Interpretation Change in 6MWD did not differ significantly between patients in the ataluren group and those in the placebo group, neither in the intention-to-treat population nor in the prespecified subgroups with a baseline 6MWD of less than 300 m or 400 m or more. However, we recorded a significant effect of ataluren in the prespecified subgroup of patients with a baseline 6MWD of 300 m or more to less than 400 m. Baseline 6MWD values within this range were associated with a more predictable rate of decline over 1 year; this finding has implications for the design of future DMD trials with the 6-minute walk test as the endpoint. Funding PTC Therapeutics.