The foot ends its swing through at a point just ahead of the knee. The leg maintains a slight angle at the knee (the leg is not straight). Having reached its high point the thigh starts a downward swing; this initiates an acceleration of the foot backwards.