Pacemaker neurons exert control over neuronal circuit function by their intrinsic ability to</p><p>generate rhythmic bursts of action potential. Recent work has identified rhythmic gut</p><p>contractions in human, mice and hydra to be dependent on both neurons and the resident</p><p>microbiota. However, little is known about the evolutionary origin of these neurons and</p><p>their interaction with microbes. In this study, we identified and functionally characterized</p><p>prototypical ANO/SCN/TRPM ion channel expressing pacemaker cells in the basal</p><p>metazoan Hydra by using a combination of single-cell transcriptomics,</p><p>immunochemistry, and functional experiments. Unexpectedly, these prototypical</p><p>pacemaker neurons express a rich set of immune-related genes mediating their interaction</p><p>with the microbial environment. Functional experiments validated a model of the</p><p>evolutionary emergence of pacemaker cells as neurons using components of innate</p><p>immunity to interact with the microbial environment and ion channels to generate</p><p>rhythmic contractions.