Thigh muscle anatomy: the three compartments
Deep fascia in the thigh separates its muscles into medial, anterior and posterior compartments. The anterior compartment muscles flex the thigh and extend the leg (straighten the knee). The medial compartment muscles adduct the femur at the hip. The posterior compartment muscles flex the leg and extend the thigh. (OpenStax Anatomy and Physiology 2e, 11.6: Appendicular Muscles of the Pelvic Girdle and Lower Limbs.)
The anterior compartment is supplied by the femoral nerve (L2 to L4). Testing the quadriceps is a quick check of this nerve: with the patient lying on their back and the knee slightly bent, they straighten the leg against resistance, and absent contraction suggests femoral nerve damage. (TeachMeAnatomy: Muscles of the Anterior Compartment of the Thigh.)
The medial compartment is supplied mainly by the obturator nerve (L2 to L4). The exception is the hamstring part of adductor magnus, supplied by the tibial part of the sciatic nerve. (TeachMeAnatomy: Muscles of the Medial Compartment of the Thigh.)
The posterior compartment, the hamstrings, is supplied by the sciatic nerve: the tibial part supplies semitendinosus, semimembranosus and the long head of biceps femoris, and the common fibular (peroneal) part supplies the short head of biceps femoris. (TeachMeAnatomy: The Hamstring Muscles.)
Front muscles of the thigh: the anterior compartment
The front upper leg muscles are the four parts of quadriceps femoris (rectus femoris, vastus lateralis, vastus medialis and vastus intermedius) and sartorius. Pectineus and the lower end of iliopsoas also lie at the front of the upper thigh. All four parts of quadriceps insert into the patella through the quadriceps tendon, and the patella is anchored to the tibial tuberosity by the patellar ligament. (TeachMeAnatomy: Muscles of the Anterior Compartment of the Thigh.)
OpenStax describes the layout of the quad muscles simply: rectus femoris lies on the front of the thigh, vastus lateralis on the outer side, vastus medialis on the inner side, and vastus intermedius between the two vasti, deep to rectus femoris. Together they extend and stabilise the knee. (OpenStax Anatomy and Physiology 2e, 11.6: Appendicular Muscles of the Pelvic Girdle and Lower Limbs.)
Anterior compartment of the thigh
| Muscle | Origin | Insertion | Innervation | Main action |
|---|---|---|---|---|
| Rectus femoris | Straight head: AIIS; reflected head: ilium above acetabulum | Patella via quadriceps tendon, then tibial tuberosity | Femoral nerve | Knee extension; hip flexion |
| Vastus lateralis | Greater trochanter, intertrochanteric line, lateral lip of linea aspera | Lateral patella via quadriceps tendon | Femoral nerve | Knee extension |
| Vastus medialis | Intertrochanteric line, spiral line, medial lip of linea aspera | Medial patella via quadriceps tendon | Femoral nerve | Knee extension |
| Vastus intermedius | Upper two-thirds of anterior and lateral femur | Deep quadriceps tendon | Femoral nerve | Knee extension |
| Sartorius | Anterior superior iliac spine | Upper medial surface of tibia (pes anserinus) | Femoral nerve | Hip flexion, abduction, lateral rotation; knee flexion |
Sources: University of Washington Musculoskeletal Atlas; TeachMeAnatomy. Femoral nerve roots L2–L4.
Quadriceps femoris: quad anatomy muscle by muscle
Rectus femoris has a straight head from the anterior inferior iliac spine and a reflected head from the groove just above the acetabulum. It forms the central part of the quadriceps tendon. It is the only quadriceps muscle that crosses both the hip and the knee, so it flexes the hip as well as extending the knee. (University of Washington Musculoskeletal Atlas: Rectus femoris.)
Vastus lateralis (the lateral vastus muscle) arises from the upper intertrochanteric line, the front and lower borders of the greater trochanter, the upper lateral lip of the linea aspera and the gluteal tuberosity. It inserts on the lateral base and border of the patella and forms the lateral patellar retinaculum. Like all the vasti it extends the knee and is supplied by the femoral nerve and, in its case, the lateral circumflex femoral artery. (University of Washington Musculoskeletal Atlas: Vastus lateralis.)
Vastus medialis arises from the lower intertrochanteric line, the spiral line, the medial lip of the linea aspera and the medial supracondylar ridge. It inserts on the medial base and border of the patella and forms the medial patellar retinaculum. (University of Washington Musculoskeletal Atlas: Vastus medialis.)
Vastus intermedius arises from the upper two-thirds of the front and lateral surfaces of the femur and forms the deep part of the quadriceps tendon. (University of Washington Musculoskeletal Atlas: Vastus intermedius.)
The two-joint quadriceps muscle: heads, actions, injuries. Rectus femoris.
Sartorius: the longest muscle of the body
Sartorius is a strap-like muscle that runs obliquely across the front of the thigh from the anterior superior iliac spine to the upper medial surface of the tibia. TeachMeAnatomy calls it the longest muscle in the body. It is the most superficial muscle of the anterior compartment and is supplied by the femoral nerve. (TeachMeAnatomy: Muscles of the Anterior Compartment of the Thigh.)
Because it crosses both joints, sartorius flexes and laterally rotates the hip and flexes the knee. (University of Washington Musculoskeletal Atlas: Sartorius.)
OpenStax describes sartorius as a band-like muscle from the anterior superior iliac spine to the medial side of the upper tibia, and notes that it allows us to sit cross-legged. (OpenStax Anatomy and Physiology 2e, 11.6: Appendicular Muscles of the Pelvic Girdle and Lower Limbs.)
Muscles on the inner thigh: the adductor muscles
The muscles of the inner thigh (the medial compartment) are adductor longus, adductor brevis, adductor magnus, gracilis and obturator externus, with pectineus at the top. Their shared job is adduction: pulling the thigh towards the midline, as when squeezing the knees together. (TeachMeAnatomy: Muscles of the Medial Compartment of the Thigh.)
Adductor longus arises from the front of the body of the pubis, just lateral to the pubic symphysis, and fans out to insert on the middle third of the linea aspera. It adducts and flexes the thigh and is supplied by the anterior division of the obturator nerve. (University of Washington Musculoskeletal Atlas: Adductor longus.)
Adductor brevis lies deep to adductor longus. It arises from the body and inferior ramus of the pubis and inserts on the linea aspera above adductor longus. It adducts the thigh and is supplied by the obturator nerve; its anterior and posterior divisions pass in front of and behind it. (TeachMeAnatomy: Muscles of the Medial Compartment of the Thigh.)
Gracilis is the most superficial and most medial muscle of the group, and it crosses both the hip and the knee. It runs from the body and inferior ramus of the pubis to the medial surface of the tibial shaft, so it adducts the thigh and flexes the knee. (TeachMeAnatomy: Muscles of the Medial Compartment of the Thigh.)
Pectineus arises from the pecten pubis and inserts on the pectineal line of the femur, just below the lesser trochanter. It adducts the thigh and flexes the hip. It is usually supplied by the femoral nerve, sometimes with an extra branch from the obturator nerve, which is why some texts place it in the anterior compartment. (University of Washington Musculoskeletal Atlas: Pectineus.)
OpenStax points out that the adductors do more than adduct: depending on foot position they can rotate the thigh medially or laterally, adductor longus also flexes the thigh, and adductor magnus extends it. (OpenStax Anatomy and Physiology 2e, 11.6: Appendicular Muscles of the Pelvic Girdle and Lower Limbs.)
Medial compartment of the thigh (adductor muscles)
| Muscle | Origin | Insertion | Innervation | Main action |
|---|---|---|---|---|
| Pectineus | Pecten pubis | Pectineal line of femur | Femoral nerve (sometimes also obturator) | Adduction; hip flexion |
| Adductor longus | Body of pubis | Middle third of linea aspera | Obturator nerve, anterior division | Adduction; hip flexion |
| Adductor brevis | Body and inferior ramus of pubis | Linea aspera, above adductor longus | Obturator nerve | Adduction |
| Adductor magnus, adductor part | Ischiopubic ramus | Back of femur and linea aspera | Obturator nerve | Adduction; hip flexion |
| Adductor magnus, hamstring part | Ischial tuberosity | Adductor tubercle | Tibial part of sciatic nerve | Adduction; hip extension |
| Gracilis | Body and inferior ramus of pubis | Medial tibial shaft (pes anserinus) | Obturator nerve, anterior division | Adduction; knee flexion |
| Obturator externus | Outer obturator membrane and surrounding bone | Back of greater trochanter | Obturator nerve | Lateral rotation; adduction |
Sources: TeachMeAnatomy; University of Washington Musculoskeletal Atlas; Radiopaedia. Obturator nerve roots L2–L4.
Adductor magnus and the adductor canal
Adductor magnus has two parts. The adductor part arises from the ischiopubic ramus and inserts along the back of the femur and the linea aspera; it is supplied by the obturator nerve. The hamstring part arises from the ischial tuberosity and inserts on the adductor tubercle of the femur; it is supplied by the sciatic nerve. (Radiopaedia: Adductor magnus muscle.)
The University of Washington atlas calls adductor magnus a powerful adductor of the thigh, whose upper horizontal fibres help flex the thigh and whose vertical fibres help extend it. (University of Washington Musculoskeletal Atlas: Adductor magnus.)
The adductor canal is a tunnel in the middle third of the thigh. Sartorius lies in front of it, vastus medialis to its lateral side and adductor longus and adductor magnus behind it. It carries the femoral artery and vein, the nerve to vastus medialis and the saphenous nerve. It ends at the adductor hiatus, a gap between the adductor and hamstring attachments of adductor magnus. (TeachMeAnatomy: The Adductor Canal.)
After passing through the adductor hiatus into the popliteal fossa behind the knee, the femoral artery and vein are renamed the popliteal artery and vein. (Radiopaedia: Adductor magnus muscle.)
Posterior thigh muscles: the hamstrings
The posterior thigh muscles are the hamstrings: biceps femoris, semitendinosus and semimembranosus. Their tendons border the popliteal fossa, the diamond-shaped space at the back of the knee. (OpenStax Anatomy and Physiology 2e, 11.6: Appendicular Muscles of the Pelvic Girdle and Lower Limbs.)
Biceps femoris lies on the lateral side. Its long head arises from the ischial tuberosity and its short head from the linea aspera of the femur; the two join in a tendon that inserts on the head of the fibula. It flexes the knee, helps extend the hip and rotates the leg laterally when the knee is bent. (TeachMeAnatomy: The Hamstring Muscles.)
Semitendinosus lies medially. It arises from the ischial tuberosity, is largely tendinous in its lower part, and inserts on the medial surface of the tibia. Semimembranosus, flat and broad, lies deep to it. Both flex the knee, extend the hip and rotate the leg medially. (TeachMeAnatomy: The Hamstring Muscles.)
Semimembranosus arises from the upper lateral quadrant of the ischial tuberosity and inserts on the back of the medial tibial condyle. It is supplied by the tibial nerve. (University of Washington Musculoskeletal Atlas: Semimembranosus.)
Automatic page for semimembranosus in the 3D model. Semimembranosus.
Posterior compartment of the thigh (hamstrings)
| Muscle | Origin | Insertion | Innervation | Main action |
|---|---|---|---|---|
| Biceps femoris, long head | Ischial tuberosity | Head of fibula | Tibial part of sciatic nerve | Knee flexion; hip extension |
| Biceps femoris, short head | Linea aspera of femur | Head of fibula | Common fibular part of sciatic nerve | Knee flexion |
| Semitendinosus | Ischial tuberosity | Medial surface of tibia (pes anserinus) | Tibial part of sciatic nerve | Knee flexion; hip extension; medial rotation |
| Semimembranosus | Ischial tuberosity (upper lateral part) | Back of medial tibial condyle | Tibial part of sciatic nerve | Knee flexion; hip extension; medial rotation |
Sources: TeachMeAnatomy; University of Washington Musculoskeletal Atlas.
The femoral triangle
The femoral triangle is a hollow at the top of the front of the thigh. Its upper border is the inguinal ligament, its lateral border is sartorius and its medial border is adductor longus. Its floor is formed by iliopsoas, pectineus and adductor longus, and its roof is the fascia lata. (TeachMeAnatomy: The Femoral Triangle.)
From lateral to medial it contains the femoral nerve, femoral artery, femoral vein and the femoral canal with its deep lymph nodes, remembered as NAVEL (nerve, artery, vein, empty space, lymphatics). (TeachMeAnatomy: The Femoral Triangle.)
Pes anserinus: where three thigh muscles meet
One muscle from each compartment ends at the same place. The tendons of sartorius (anterior), gracilis (medial) and semitendinosus (posterior) join on the front of the medial tibia, about 4 cm below the tibial plateau, as the pes anserinus ('goose's foot'). A bursa lies between these tendons and the deeper semimembranosus tendon and can become inflamed (pes anserinus bursitis). (Radiopaedia: Pes anserinus.)
Common thigh muscle injuries
Hamstring strains are common in sport. Most studies show more injuries to biceps femoris than to the medial hamstrings. Risk is highest at the end of the swing phase of running, when the hamstrings are maximally lengthened while contracting to slow the leg. A previous hamstring injury is one of the strongest predictors of another, and recurrence rates of 12 to 14% have been reported in soccer players. (Carlson C. The natural history and management of hamstring injuries. Curr Rev Musculoskelet Med. 2008.)
A 'groin strain' is usually an adductor strain. The upper part of the muscle near its pelvic attachment is most often affected, typically in sports with explosive movements or extreme stretching. (TeachMeAnatomy: Muscles of the Medial Compartment of the Thigh.)
Sudden, forceful contraction of the hamstrings can also pull off a piece of the ischial tuberosity (an avulsion fracture), mainly in adolescents whose growth plates are still open. (TeachMeAnatomy: The Hamstring Muscles.)
Thigh muscles in the 3D model
- Adductor brevis
- A short adductor in the medial thigh, lying behind pectineus and adductor longus.
- Adductor longus
- The most anterior adductor muscle; its medial edge forms the medial border of the femoral triangle.
- Adductor magnus
- The largest adductor, with an adductor part and a hamstring part.
- Adductor minimus
- The upper, anterior fibres of adductor magnus, sometimes described as a separate part.
- Gracilis
- A long, thin muscle on the medial side of the thigh.
- Long head of biceps femoris
- The long, superficial head of biceps femoris, the lateral hamstring.
- Pectineus
- A flat quadrangular muscle at the top of the medial thigh forming part of the floor of the femoral triangle.
- Rectus femoris
- The only part of quadriceps femoris that crosses both the hip and knee.
- Sartorius
- The longest muscle in the body, a strap-like muscle crossing the thigh obliquely.
- Semimembranosus
- A hamstring muscle on the posteromedial thigh with a long flat tendon of origin.
- Semitendinosus
- A hamstring muscle with a long cord-like tendon on the posteromedial thigh.
- Short head of biceps femoris
- The head of biceps femoris that does not cross the hip joint.
- Vastus intermedius
- The deep quadriceps muscle lying beneath rectus femoris.
- Vastus lateralis
- The largest quadriceps muscle on the lateral thigh.
- Vastus medialis
- The medial quadriceps muscle with oblique fibers near the patella.
Frequently asked questions
What are the main muscles of the thigh?
The thigh has three groups. At the front are quadriceps femoris (rectus femoris and the three vasti) and sartorius. On the inner side are the adductors: adductor longus, brevis and magnus, gracilis and pectineus. At the back are the hamstrings: biceps femoris, semitendinosus and semimembranosus. They are supplied by the femoral, obturator and sciatic nerves respectively.
What are the adductor muscles?
The adductor muscles are the muscles of the inner thigh that pull the thigh towards the midline: adductor longus, adductor brevis, adductor magnus, gracilis and pectineus, with obturator externus deep in the same compartment. Most arise from the pubis or ischium and insert on the back of the femur. They are supplied mainly by the obturator nerve.
What are the four quadriceps muscles?
Rectus femoris, vastus lateralis, vastus medialis and vastus intermedius. All four join in the quadriceps tendon on the patella, which is anchored to the tibial tuberosity by the patellar ligament, and all extend the knee. Rectus femoris is the only one that also crosses the hip, so it flexes the hip as well. All are supplied by the femoral nerve.
Which is the longest muscle in the body?
Sartorius, a thin strap muscle that runs diagonally across the front of the thigh from the anterior superior iliac spine of the pelvis to the upper medial surface of the tibia. It flexes, abducts and laterally rotates the hip and flexes the knee, the combination used to sit cross-legged. It is supplied by the femoral nerve.
What muscles are in the back of the thigh?
The hamstrings: biceps femoris on the outer side, and semitendinosus and semimembranosus on the inner side. Apart from the short head of biceps femoris, which arises from the femur, they arise from the ischial tuberosity of the pelvis. They bend the knee and extend the hip, and are supplied by the sciatic nerve.
Which hamstring muscle is injured most often?
Biceps femoris. Most epidemiological studies report more strains in biceps femoris than in the medial hamstrings, especially its long head. Injuries usually happen at the end of the swing phase of sprinting, when the muscle is stretched while working to slow the leg. A previous hamstring injury is one of the strongest risk factors for another.
References
- OpenStax. Anatomy and Physiology 2e, §11.6 Appendicular Muscles of the Pelvic Girdle and Lower Limbs. Rice University, 2022.
- TeachMeAnatomy. Muscles of the Anterior Compartment of the Thigh.
- TeachMeAnatomy. Muscles of the Medial Compartment of the Thigh.
- TeachMeAnatomy. The Hamstring Muscles.
- TeachMeAnatomy. The Femoral Triangle.
- TeachMeAnatomy. The Adductor Canal.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Rectus femoris.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Vastus lateralis.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Vastus medialis.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Vastus intermedius.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Sartorius.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Pectineus.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Adductor longus.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Adductor magnus.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Gracilis.
- University of Washington Department of Radiology. Musculoskeletal Atlas: Semimembranosus.
- Radiopaedia. Adductor magnus muscle.
- Radiopaedia. Pes anserinus.
- Carlson C. The natural history and management of hamstring injuries. Curr Rev Musculoskelet Med. 2008;1(2):120–123.
- Mitsuhashi N. et al. (2009). BodyParts3D: 3D structure database for anatomical concepts. Nucleic Acids Research 37, D782–D785. Data © The Database Center for Life Science, CC BY 4.0.
Related anatomy
- Hip musclesMuscles of the hip explained: gluteus maximus, medius and minimus, TFL, piriformis, obturator internus and the other…
- Rectus femorisRectus femoris anatomy: straight and reflected heads, insertion, why it flexes the hip and extends the knee, nerve and…
- FemurFemur bone labelled: head, neck, trochanters, linea aspera, condyles and epicondyles, with muscle attachments, blood…
- Knee jointLigaments of the knee explained with labelled diagrams: ACL, PCL, MCL, LCL, patellar ligament and menisci, plus knee…
- Leg musclesLower leg muscles by compartment: tibialis anterior, fibularis (peroneus) longus and brevis, gastrocnemius, soleus…
- Lower limb nervesLower limb nerves explained: lumbar and sacral plexus diagram, femoral, saphenous, sciatic, tibial, common peroneal…
Explore the whole body in the interactive 3D human anatomy model, or browse the A–Z list of human structures.