In the gluteal region, the piriformis passes posterior to the hip joint and attaches to a facet on the upper margin of the greater trochanter of the femur.
The piriformis externally rotates and abducts the femur at the hip joint and is innervated in the pelvic cavity by the nerve to the piriformis, which originates as branches from S1 and S2 of the sacral plexus (see Chapter 5, p. 485).