The inferior gemellus muscle arises from the ischial tubrosity and inserts on the medial surface of the greater trochanter of the femur and rotates the thigh outward.