Inhaled nitric oxide improves oxygenation in severely hypoxaemic term neonates, which lessens the need for extracorporeal-membrane oxygenation. Improvement in other relevant outcomes remains unknown, and safety of inhaled nitric oxide is uncertain in preterm neonates. We did a randomised controlled trial to assess use of inhaled nitric oxide in preterm and near-term neonates.