The management of paediatric asthma exacerbations is based on trials in children of all ages. Recent studies from 2009 raised the possibility that preschoolers (younger than 6 years) with viral-induced wheezing and children exposed to tobacco smoke might be at an increased risk of treatment failure. The study objective was to identify factors associated with management failure in children presenting to the emergency department with moderate or severe asthma exacerbations. We undertook a prospective, multicentre cohort study of children aged 1-17 years presenting to five emergency departments with moderate or severe asthma (defined as a Pediatric Respiratory Assessment Measure [PRAM] of 4 to 12). Children received oral corticosteroids and severity-specific inhaled bronchodilator therapy. The primary outcome was emergency department management failure (hospital admission, prolonged emergency department therapy [≥8 h], or relapse within 72 h of discharge from the emergency department with admission to hospital or prolonged emergency department stay). Viral cause was ascertained by PCR on nasopharyngeal specimens and environmental tobacco smoke exposure by salivary cotinine concentration. This study is registered at ClinicalTrials.gov (NCT02013076). Between Feb 14, 2011, and Dec 20, 2013, we screened 1893 children and enrolled 1012 eligible children. Of those eligible children, 973 participants were included in the analysis. 165 (17%) of 965 children experienced management failure in the emergency department, which was significantly associated with viral detection (110 [19%] of 579 participants with virus detection vs 46 [13%] of 354 participants without viral detection, odds ratio [OR] 1·57; 95% CI 1·04-2·37), fever (24% vs 15%, 1·96; 1·32-2·92), baseline PRAM (OR 1·38 per 1-point increase; 1·22-1·56), oxygen saturation of less than 92% (50% vs 12%, 3·94; 1·97-7·89), and presence of symptoms between exacerbations (21% vs 16%, 1·73; 1·13-2·64). Age, salivary cotinine concentration, and oral corticosteroids dose were not significantly associated with management failure. Viral detection (67% vs 46%, p<0·0001) and fever (31% vs 16%, p<0·0001) occurred more frequently in preschoolers than in older children. Viral detection was also associated with reduced speed of recovery over the 10 days after discharge. In children presenting with moderate or severe asthma, viral detection, but not age, was associated with failure of symptom management, independently from exacerbation severity (ie, baseline PRAM and oxygen saturation), fever, and symptom chronicity (viral detection). Although it did not reach statistical significance, the association between treatment management failure and exposure to tobacco smoke warrants further investigation. Canadian Institutes of Health Research.