Cerebral palsy is caused by an injury to the brain before, during, or shortly after birth .
In many cases, no one knows for sure what caused the brain injury or what may have been done to prevent the injury. The injury might be caused by an infection or by an accident in which the mother is hurt. If a mother has a medical problem such as high blood pressure or diabetes, this can also cause problems in the baby. There may be problems during birth such as the baby not getting enough oxygen, or a difficult delivery in which the baby's brain is injured. Even babies born at the right time can have infections, or bleeding in their brain which causes a brain injury because the brain is still developing even after birth.