The flexor digitorum longus descends in the leg and forms a tendon, which crosses posterior to the tendon of the tibialis posterior muscle near the ankle joint. The tendon continues inferiorly in a shallow groove behind the medial malleolus and then swings forward to enter the sole of the foot. It crosses inferior to the tendon of the flexor hallucis longus muscle to reach the medial side of the foot and then divides into four tendons, which insert on the plantar surfaces of the bases of the distal phalanges of digits II to V.