The extensor hallucis longus extends the great toe. Because it crosses anterior to the ankle joint, it also dorsiflexes the foot at the ankle joint. Like all muscles in the anterior compartment of the leg, the extensor hallucis longus muscle is innervated by the deep fibular nerve.