Background: We aimed to determine whether high-flow nasal oxygen could reduce the incidence of decreased peripheral oxygen saturation (SpO 2 ) compared with standard oxygen in patients at risk of hypoxaemia undergoing gastrointestinal endoscopy under deep sedation. Methods: This was a multicentre, randomised controlled trial with blinded assessment of the primary outcome evaluating high-flow nasal oxygen (gas flow 70 L min À1 , inspired oxygen fraction 0.50) or standard oxygen delivered via nasal cannula or face mask (6 L min À1 ) or nasopharyngeal tube (5 L min À1 ) in patients at risk of hypoxaemia (i.e. >60 yr old, or with underlying cardiac or respiratory disease, or with ASA physical status >1, or with obesity or sleep apnoea syndrome) undergoing gastrointestinal endoscopy. The primary endpoint was the incidence of SpO 2 92%. Secondary outcomes included prolonged or severe desaturations, need for manoeuvres to maintain free upper airways, and other adverse events. Results: In 379 patients, a decrease in SpO 2 92% occurred in 9.4% (18/191) for the high-flow nasal oxygen group, and 33.5% (63/188) for the standard oxygen groups (adjusted absolute risk difference, e23.4% [95% confidence interval (CI), e28.9 to e16.7]; P<0.001). Prolonged desaturation (>1 min) and manoeuvres to maintain free upper airways were less frequent in the high-flow nasal oxygen group than in the standard oxygen group (7.3% vs 14.9%, P¼.02, and 11.1% vs 32.4%, P<0.001). Conclusions: In patients at risk of hypoxaemia undergoing gastrointestinal endoscopy under deep sedation, use of highflow nasal oxygen significantly reduced the incidence of peripheral oxygen desaturation. Clinical trial registration: NCT03829293.