Legs in a fly pupa are tightly folded in Z-configuration: the femur points forward. The fly emerges from the pupa with all legs stretched backwards. How does the fly turn long femora inside the tight puparium? Flies were captured during emergence at various moments of progress out of the puparium and at once fixed in ethanol, postfixed in Bouin's solution. Specimens were ranged by the grade of progressive extrication and maturation. Legs were excised, their configurations photographed. Legs are anchored to the VIII. abdominal segment of the puparium with the pupal sheath. Some podomers were arched or buckled yet in pharate adults. At the initial moment of extrication, new buckles appeared in femora, they split femora into 2-3 subpodomers. Instead of turning the whole femur, the fly dragged through the puparium a chain of short subpodomers linked together with transient hinges. Hinges emerged in unsclerotized areas of the tubular podomer, close to sclerotized areas (juvenile sclerites). During extrication, legs were stretched passively. This process lasted for 1-3 min, initial phase few seconds. Residual distortions were left in hind legs of free juvenile adults. Mechanics of buckling and straightening is discussed from the viewpoint of strength of materials. (C) 2016 Elsevier Ltd. All rights reserved.