Upon sensing starvation stress, Caenorhabditis elegans larvae (L2d) elicit two seemingly opposing behaviors to escape from the stressful condition: food-seeking roaming mediated by the opioid peptide NLP-24 and dauer formation mediated by pheromones. Because opioid and pheromone signals both originate in ASI chemosensory neurons, we hypothesized that they might act sequentially or competitively to avoid starvation stress. Our data shows that NPR-17 opioid receptor signaling suppressed pheromone biosynthesis and the overexpression of opioid genes disturbed dauer formation. Likewise, DAF-37 pheromone receptor signaling negatively modulated nlp-24 expression in the ASI neurons. Under short-term starvation (STS, 3 h), both pheromone and opioid signaling were downregulated in gpa-3 mutants. Surprisingly, the gpa-3;nlp-24 double mutants exhibited much higher dauer formation than seen in either of the single mutants. Under long-term starvation (LTS, >24 h), the stress-activated SKN-1a downregulated opioid signaling and then enhanced dauer formation. Both insulin and serotonin stimulated opioid signaling, whereas NHR-69 suppressed opioid signaling. Thus, GPA-3 and SKN-1a are proposed to regulate cross-antagonistic interaction between opioids and pheromones in a cell-specific manner. These regulatory functions are suggested to be exerted via the selective interaction of GPA-3 with NPR-17 and site-specific SKN-1 binding to the promoter of nlp-24 to facilitate stress avoidance. Animals, including Caenorhabditis elegans, are confronted with a variety of environmental stresses such as starvation, temperature changes, and increased population density, among others. In some cases, the best strategy for handling such insults might be to avoid them. Regardless of its duration, stress generally perturbs homeostasis and elicits responses that lead to critical cellular processes 1 , evolutionarily-conserved behavioral, endocrinal, and cognitive outcomes to ensure survival 2. When early-stage C. elegans larvae encounter starvation stress, they often elicit two seemingly opposing behavioral responses: (i) their pharyngeal pumping rate is stimulated to drive foraging 3 or (ii) they enter the dauer stage, an alternative third larval stage. The foraging behavioral response is governed by endogenous opioid signaling 4. Additionally, two groups of chemosensory and mechanosensory glutamatergic neurons are shown to trigger food-seeking behaviors 5. The dauer formation is mainly induced by pheromones through the modulatory actions of insulin and TGF-β signaling 6-10. The C. elegans endogenous opioid signaling system consists of opioid ligands (e.g., NLP-24) and their receptors (e.g., NPR-17, a homolog of mammalian opioid receptors) 4. In mammals, endogenous (e.g., endorphins) or synthetic (e.g., fentanyl) opioids have been implicated in stress avoidance by either attenuating stress responses or by dulling stress-induced pain 11-14. The pheromone signaling system consists of ascaroside pheromones (e.g., daumone, ascr#2, 3) 15,16 and at least f...