The stomatogastric nervous system (STNS) of adult lobsters and crabs generates a number of different rhythmic motor patterns which control different regional movements of the foregut. Since these output patterns are generated by discrete neural networks that, in the adult, are well characterized in terms of synaptic and cellular properties, this system constitutes an ideal model for exploring the mechanisms underlying the ontogeny of neural network organization. The foregut and its rhythmic motor patterns were studied in in vitro STNS nerve-muscle preparations of the embryo and different larval stages of the lobster Homarus gammarus. The development of Homarus comprises a long embryonic stage in ovo followed by three pelagic larval stages prior to the onset of benthic life. During these stages the foregut itself develops slowly from a simple ectodermal invagination that occurs in the embryo. During successive larval stages it progressively acquires all the specialized structures and shape of the adult foregut. In contrast, the STNS is morphologically recognizable at early embryonic stages. In all recorded stages the STNS spontaneously expresses rhythmic motor activity. During development, this activity is progressively restructured, beginning with a single rhythmic motor pattern in the embryo where all the stomodeal muscles are strongly coordinated. In subsequent stages, however, this single pattern is progressively subdivided to give rise eventually to the three discrete rhythmic motor patterns characteristic of the adult STNS. Our data suggest that rather than a dismantling of redundant embryonic and larval neural networks, the different adult networks emerge as a progressive partitioning of discrete circuits from a single embryonic network.