How did true flies evolve from early four-winged ancestors?
True flies (order Diptera) evolved from four-winged ancestors, a lineage shared with other members of the panorpoid complex, such as scorpionflies and caddisflies. Fossil evidence from Permian deposits indicates that these early ancestors possessed two pairs of wings and resembled modern crane flies.1
Over the course of their evolution, the second pair of wings in true flies became reduced to small, knob-like structures known as halteres. These specialized organs function as gyroscopes, vibrating in synchronization with the primary wings to provide essential balance and stability, allowing the insect to adjust its flight attitude during yaw, roll, or pitch. While most insects utilize two pairs of wings for flight, the modification of the hind wings into halteres is a defining characteristic that distinguishes true flies from other winged insects. By the end of the Eocene Epoch, approximately 34 million years ago, most modern families of flies had already evolved.231