Cerebral palsy (CP) is caused by brain injuries or abnormalities before, during, or shortly after birth. Possible causes include infections, strokes, genetic diseases, and medical issues during pregnancy.