The purpose of this study was to analyze the effect of lengthening of the medial hamstrings on the gait of patients who had spastic cerebral palsy. Thirty-one patients had preoperative and postoperative gait analyses. Standard parameters, such as velocity, cadence, and stride length, were evaluated, as were motion graphs of the hip, knee, and ankle. There was little difference between the preoperative and postoperative mean values for velocity, cadence, and stride length, which were expressed as percentages of normal for the patient's age. The contours of the postoperative motion graphs of the knees changed very little compared with those of the preoperative graphs; when a graph showed restricted motion preoperatively, it did so postoperatively. Although extension of the knee in stance phase improved postoperatively, the improvement was accompanied by decreased flexion of the knee during swing phase. When spasticity of both the hamstrings and the quadriceps was noted on the preoperative electromyogram, motion of the knee in the sagittal plane was markedly restricted.