A 24-year-old man is stabbed in the right groin, the wound lying just below the inguinal ligament. Bleeding is controlled in the emergency department. He cannot extend the right knee against gravity, and the right knee jerk is absent. Sensation is reduced over the front of the thigh and the medial side of the leg as far as the medial border of the foot. Hip adduction and knee flexion are normal, and the ankle jerk is present.
Injury to which one of the following nerves best explains this man's knee findings and the distribution of his numbness?