Final answer:
The inferior gemellus muscle laterally rotates the femur at the hip joint and is innervated by the nerve to obturator internus, a branch of the sacral plexus.
Step-by-step explanation:
The inferior gemellus is a muscle located deep to the gluteus maximus on the lateral surface of the thigh. The primary action of the inferior gemellus is to laterally rotate the femur at the hip joint, not to abduct the hip joint or flex the knee. As for the nerve supply, it is innervated by the nerve to obturator internus which effectively is a branch of the sacral plexus, specifically from roots L5 to S2, and not by the obturator nerve or the femoral nerve as suggested in the question.