The thigh is divided into three compartments by intermuscular septa between the posterior aspect of the femur and the fascia lata (the thick layer of deep fascia that completely surrounds or invests the thigh; Fig. 6.52C):
The anterior compartment of the thigh contains muscles that mainly extend the leg at the knee joint.
The posterior compartment of the thigh contains muscles that mainly extend the thigh at the hip joint and flex the leg at the knee joint.