Background and purpose — Joint contracture is a common problem among children with cerebral palsy (CP). To prevent severe contracture and its effects on adjacent joints, it is crucial to identify children with a reduced range of motion (ROM) early. We examined whether significant hip, knee, or foot contracture occurs earliest in children with CP. Patients and methods — This was a longitudinal study involving 27,230 measurements obtained for 2,693 children (59% boys, 41% girls) with CP born 1990 to 2018 and registered before 5 years of age in the Swedish surveillance program for CP. The analysis was based on 4,751 legs followed up for an average of 5.0 years. Separate Kaplan–Meier (KM) curves were drawn for each ROM to illustrate the proportions of contracture-free legs at a given time during the follow-up. Using a clustered bootstrap method and considering the child as the unit of clustering, 95% pointwise confidence intervals were generated for equally spaced time points every 2.5 years for each KM curve. Results — Contracture developed in 34% of all legs, and the median time to the first contracture was 10 years from the first examination. Contracture was most common in children with a higher Gross Motor Function Classification System (GMFCS) level. The first contracture was a flexion contracture preventing dorsiflexion in children with GMFCS level I or II and preventing knee extension in children with GMFCS level III to V. Interpretation — Early interventions to prevent knee and foot contractures in children with CP should be considered.