Step 1: Recall what poliomyelitis does to muscles.
Poliomyelitis destroys anterior horn cells in the spinal cord, so it paralyses muscles in a patchy, asymmetric way. Some muscle groups become weak or flaccid, while others that are spared keep working. Over time, the muscles that still work pull the joint out of position because the weak, opposing muscles cannot resist them. This imbalance is what produces the late deformities.
Step 2: Identify the muscle behind the hip and knee deformity.
The tensor fasciae latae is a hip muscle that flexes, abducts, and internally rotates the hip. It runs down into the iliotibial band, which crosses the knee, so a tight tensor fasciae latae also pulls the knee into flexion and external rotation as the limb tries to compensate. When this muscle escapes paralysis and becomes tight (contracted) while its opposing muscles are weak, it drags the hip and knee into the classic flexion, abduction, and rotation posture seen in old polio patients.
Step 3: Rule out gastrocnemius.
The gastrocnemius acts at the ankle and knee, mainly causing plantarflexion of the ankle (equinus) and some knee flexion. It does not explain a combined hip and knee rotation deformity, so it is not the answer here.
Step 4: Rule out tendo Achilles.
A tight tendo Achilles produces an equinus deformity of the ankle, where the heel stays raised. This is a well known late effect of polio, but it is an ankle problem, not the hip and knee flexion-rotation deformity asked about here.
Step 5: Rule out hamstrings.
Tight hamstrings would cause knee flexion, but they do not produce the rotational component or the hip flexion-abduction pattern described.
Step 6: Final answer.
The classical flexion and rotation deformity at the hip and knee after polio comes from contracture of the tensor fasciae latae.
\[ \boxed{\text{Tensor fasciae latae}} \]