The nerve to the quadratus femoris enters the gluteal region through the greater sciatic foramen inferior to the piriformis muscle and deep to the sciatic nerve (Fig. 6.48). Unlike other nerves in the gluteal region, the nerve to the quadratus femoris lies anterior to the plane of the deep muscles.