Alternative patterns of neural activity drive different rhythmic locomotory patterns in both invertebrates and mammals. The neuro-molecular mechanisms responsible for the expression of rhythmic behavioral patterns are poorly understood. Here we show that Caenorhabditis elegans switches between distinct forms of locomotion, or crawling versus swimming, when transitioning between solid and liquid environments. These forms of locomotion are distinguished by distinct kinematics and different underlying patterns of neuromuscular activity, as determined by in vivo calcium imaging. The expression of swimming versus crawling rhythms is regulated by sensory input. In a screen for mutants that are defective in transitioning between crawl and swim behavior, we identified unc-79 and unc-80, two mutants known to be defective in NCA ion channel stabilization. Genetic and behavioral analyses suggest that the NCA channels enable the transition to rapid rhythmic behaviors in C. elegans. unc-79, unc-80, and the NCA channels represent a conserved set of genes critical for behavioral pattern generation.neural rhythms ͉ neurogenetics ͉ sodium leak channel D ifferent forms of rhythmic neural output are ubiquitously observed in motor behaviors such as locomotion, respiration, and feeding (1-4). Extensive research has revealed that a neural network can switch among alternate rhythms by altering the properties of specific intrinsic membrane currents and synapses (5). Consistent with this framework, some proteins appear to contribute more to the generation of one rhythm than other rhythms. For instance, channels that carry the persistent sodium current appear to be important for gasping but not the normal respiratory rhythm when studied in vitro (6). Physiological approaches are sometimes limited when trying to identify specific proteins involved in certain rhythms, however, because of the availability and selectivity of compounds that act on the relevant molecules. With the advent of reverse genetics, these limitations are beginning to be overcome by knocking out or modifying specific genes (7, 8), but both pharmacological and gene manipulation approaches are still limited by the a priori hypotheses on which molecules to target. In contrast, because forward genetic studies are unbiased, they can lead to the identification of novel or uncharacterized proteins that contribute to rhythmic neural output. We have therefore pursued a forward genetic approach to identify neural proteins that contribute more to the generation of one form of rhythmic locomotion (i.e., swimming) than another (i.e., crawling) in the nematode Caenorhabditis elegans.C. elegans moves by generating waves of dorsal-ventral (DV) bends along its body. Prior genetic studies have focused on the molecular mechanisms responsible for crawling over a solid agar substrate (9, 10), whereas the motion C. elegans displays in liquid has only begun to be characterized (11). Although C. elegans encounters water in its natural environment (12), it has been unclear whether its motion i...