The metamorphosis of a caterpillar into a butterfly is frequently presented as a stereotypic insect metamorphosis. The caterpillar cuticle splits along the dorsum (top) from the head through the thorax. The pupa squeezes out of the slit in the larval cuticle. However, this process is not the same in all insects. Diptera (flies) have a uniquely different sequence that has been most studied in Drosophila (Fruit fly).
Drosophila larvae that are ready to molt, quit feeding and climb the sides of their container. The larva eventually ceases moving, attaches itself to the container and withdraws the larval head and prothorax everting the prothoracic spiracles. The movement of head and thorax relative to the rest of the body cause the larva to shorten and swell into a shape different from the larva, the prepupa (A). The prepupa cuticle undergoes a process of sclerotization, in which the proteins of the cuticle become cross-linked, making the cuticle hard and stiff. This structure is called a puparium (B). The larval tissues separate from the cuticle of the puparium and the pupa forms inside the hard protective puparium case. The head of the pupa can be seen inside the puparium (C, arrow).
This process illustrates the flexibility of the cuticle shape and properties that can occur in the absence of a molt. Even more profound changes take place as the pupa reorganizes the larval tissues.