How a neuron responds to and withstands injury is a central question in neurobiology. Neuronal injury can be caused mechanically with force, chemically with toxic insults, or genetically with mutations in genes that lead to damage. The axon, the neuron's longest compartment, is often the focal point of degeneration due to traumatic injury, toxic insults, or neurodegenerative diseases.Damage to the axon can have drastic functional consequences for the organism. In some cases axonal injury can lead to death of the neuron, while in others repair mechanisms are triggered that promote regeneration of the injured axon. Important discoveries during the last decade have uncovered many components of the molecular machinery that regulate axonal degeneration and regeneration. However, the precise ways in which these pathways converge and respond to different insults remains largely unknown. Here, using the nematode Caenorhabditis elegans as an experimental model system, we present important discoveries outlining the cellular and molecular mechanisms underpinning axonal maintenance and regeneration. Using forward and reverse genetic approaches, combined with optogenetic, genetic, and laser-injury tools, we identify critical components of these biological processes. We demonstrate how genes functioning during axon development also have roles in mature axons, regulating both degeneration and regeneration.Firstly, we discover a role for MEC-7/β-tubulin in regulating both axon development and regeneration. Second, we develop and characterize an optogenetic method to induce cell ablation and neurodegeneration using the genetically encoded photosensitizer KillerRed. Third, we identify novel mutants with defects in axonal maintenance and describe a new phenomenon of neuronal fusion following genetically induced damage. Finally, we demonstrate a role for conserved components of the apoptotic machinery in the recognition of damaged neurons during regeneration.These findings both extend our understanding of the molecular mechanisms of axonal degeneration and regeneration, as well as provide new paradigms in which these processes can be investigated.