Terminal differentiation generates the specialized features and functions that allow postmitotic cells to acquire their distinguishing characteristics. This process is thought to be controlled by transcription factors called 'terminal selectors' that directly activate a set of downstream effector genes. In Caenorhabditis elegans, the differentiation of both the mechanosensory touch receptor neurons (TRNs) and the multidendritic nociceptor FLP neurons uses the terminal selectors UNC-86 and MEC-3. The FLP neurons fail to activate TRN genes, however, because a complex of two transcriptional repressors (EGL-44/EGL-46) prevents their expression. Here, we show that the ZEB family transcriptional factor ZAG-1 promotes TRN differentiation not by activating TRN genes but by preventing the expression of EGL-44/EGL-46. As EGL-44/EGL-46 also inhibits the production of ZAG-1, these proteins form a bistable, negative-feedback loop that regulates the choice between the two neuronal fates.