The muscles located in the leg that move the ankle and foot are divided into anterior, posterior, and lateral compartments. The tibialis anterior, which dorsiflexes the foot, is antagonistic to the gastrocnemius and soleus muscles, which plantar flex the foot.