IMPORTANCE Timely analgesia is critical for children with injuries presenting to the emergency department, yet pain control efforts are often inadequate. Intranasal administration of pain medications provides rapid analgesia with minimal discomfort. Opioids are historically used for significant pain from traumatic injuries but have concerning adverse effects. Intranasal ketamine may provide an effective alternative. OBJECTIVE To determine whether intranasal ketamine is noninferior to intranasal fentanyl for pain reduction in children presenting with acute extremity injuries. DESIGN, SETTING, AND PARTICIPANTS The Pain Reduction With Intranasal Medications for Extremity Injuries (PRIME) trial was a double-blind, randomized, active-control, noninferiority trial in a pediatric, tertiary, level 1 trauma center. Participants were children aged 8 to 17 years presenting to the emergency department with moderate to severe pain due to traumatic limb injuries between March 2016 and February 2017. Analyses were intention to treat and began in May 2017. INTERVENTIONS Intranasal ketamine (1.5 mg/kg) or intranasal fentanyl (2 μg/kg). MAIN OUTCOMES AND MEASURES The primary outcome was reduction in visual analog scale pain score 30 minutes after intervention. The noninferiority margin for this outcome was 10. RESULTS Of 90 children enrolled, 45 (50%) were allocated to ketamine (mean [SD] age, 11.8 [2.6] years; 26 boys [59%]) and 45 (50%) to fentanyl (mean [SD] age, 12.2 [2.3] years; 31 boys [74%]). Thirty minutes after medication, the mean visual analog scale reduction was 30.6 mm (95% CI, 25.4-35.8) for ketamine and 31.9 mm (95% CI, 26.6-37.2) for fentanyl. Ketamine was noninferior to fentanyl for pain reduction based on a 1-sided test of group difference less than the noninferiority margin, as the CIs crossed 0 but did not cross the prespecified noninferiority margin (difference in mean pain reduction between groups, 1.3; 90% CI, −6.2 to 8.7). The risk of adverse events was higher in the ketamine group (relative risk, 2.5; 95% CI, 1.5-4.0), but all events were minor and transient. Rescue analgesia was similar between groups (relative risk, 0.89; 95% CI, 0.5-1.6). CONCLUSIONS AND RELEVANCE Ketamine provides effective analgesia that is noninferior to fentanyl, although participants who received ketamine had an increase in adverse events that were minor and transient. Intranasal ketamine may be an appropriate alternative to intranasal fentanyl for pain associated with acute extremity injuries. Ketamine should be considered for pediatric pain management in the emergency setting, especially when opioids are associated with increased risk.