Aims/hypothesis Hypoglycaemia during and after exercise remains a challenge. The present study evaluated the safety and efficacy of closed-loop insulin delivery during unannounced (to the closed-loop algorithm) afternoon physical activity and during the following night in young people with type 1 diabetes. Methods A randomised, two-arm, open-label, in-hospital, crossover clinical trial was performed at a single site in Slovenia. The order was randomly determined using an automated web-based programme with randomly permuted blocks of four. Allocation assignment was not masked. Children and adolescents with type 1 diabetes who were experienced insulin pump users were eligible for the trial. During four separate in-hospital visits, the participants performed two unannounced exercise protocols: moderate intensity (55% of V Á O 2max ) and moderate intensity with integrated highintensity sprints (55/80% of V Á O 2max ), using the same study device either for closed-loop or open-loop insulin delivery. We investigated glycaemic control during the exercise period and the following night. The closed-loop insulin delivery was applied from 15:00 h on the day of the exercise to 13:00 h on the following day.Results Between 20 January and 16 June 2016, 20 eligible participants (9 female, mean age 14.2 ± 2.0 years, HbA 1c 7.7 ± 0.6% [60.0 ± 6.6 mmol/mol]) were included in the trial and performed all trial-mandated activities. The median proportion of time spent in hypoglycaemia below 3.3 mmol/l was 0.00% for both treatment modalities (p = 0.7910). Use of the closed-loop insulin delivery system increased the proportion of time spent within the target glucose range of 3.9-10 mmol/l when compared with open-loop delivery: 84.1% (interquartile range 70.0-85.5) vs 68.7% (59.0-77.7), respectively (p = 0.0057), over the entire study period. This was achieved with significantly less insulin delivered via the closed-loop (p = 0.0123). Conclusions/interpretation Closed-loop insulin delivery was safe both during and after unannounced exercise protocols in the in-hospital environment, maintaining glucose values mostly within the target range without an increased risk of hypoglycaemia.Trial registration Clinicaltrials.gov NCT02657083 Funding