a, Schematic of the Drosophila nervous system showing a pair of DNs that project from the brain to motor circuits in the VNC (left). Activation of small sets of comDNs (green) can drive complete behaviours. Thus, comDNs are thought to send simple, high-level control signals to the VNC, where they are transformed into complex, multi-joint movements. However, larger popDNs (orange) are also known to become active during natural behaviours (right). Therefore, in another model, individual DNs contribute to complex behaviours by sending low-level signals that control the fine-grained movements of individual or sparse sets of joints. b, We stimulated three sets of comDNs to elicit three distinct behaviours: forwards walking (DNp09, green)3,14, antennal grooming (aDN2, red)4 and backwards walking (MDN, cyan) (left)2. DN cell body locations are schematized. Two coarse subdivisions of the adult Drosophila brain are the cerebral ganglia (CRG; previously known as the supraoesophageal ganglion) and the GNG (also known as the suboesophageal ganglion) (right)59. We recorded from DNs within the GNG, which houses most DNs14. c, We recorded neural activity in the axons of GNG DN populations (orange) during optogenetic stimulation of different sets of comDNs (green). The grey dashed line denotes a coronal section region of interest in the thoracic cervical connective illustrating DN axon cross-sections (orange ellipses). d, A system for recording behaviour, GNG DN neural activity29 and optogenetically stimulating comDN axons in the neck connective (schema not to scale). The inset shows a camera image of a fly with focused laser light on its neck. Superimposed on the camera image are pose estimation key points (light blue).