Dipteran insects along with the majority of other insect orders use what are known as indirect flight muscles to accomplish flight. Indirect insect flight muscles are composed of two sets of perpendicular muscles (see left figure) that are attached to the thorax (instead of directly to the wing base as is the case for direct flight muscles). When the first set of muscles contracts, they deform the body of the insect and compress its thorax vertically, which lifts the wings. When the first set of muscles relaxes and the second set contracts, the thorax is squeezed in the opposite direction, which extends the body vertically and moves the wings downward. The below figure demonstrates this movement with only the first set of muscles.