d-Alanine is a structural component of mycobacterial peptidoglycan. The primary route of d-alanine biosynthesis in eubacteria is the enantiomeric conversion from l-alanine, a reaction catalysed by d-alanine racemase (Alr). Mycobacterium smegmatis alr insertion mutants are not dependent on d-alanine for growth and display a metabolic pattern consistent with an alternative pathway for d-alanine biosynthesis. In this study, we demonstrate that the M. smegmatis alr insertion mutant TAM23 can synthesize d-alanine at lower levels than the parental strain. The insertional inactivation of the alr gene also decreases the intracellular survival of mutant strains within primary human monocyte-derived macrophages. By complementation studies, we confirmed that the impairment of alr gene function is responsible for this reduced survival. Inhibition of superoxide anion and nitric oxide formation in macrophages suppresses the differential survival. In contrast, for bacteria grown in broth, both strains had approximately the same susceptibility to hydrogen peroxide, acidified sodium nitrite, low pH and polymyxin B. In contrast, TAM23 exhibited increased resistance to lysozyme. d-Alanine supplementation considerably increased TAM23 viability in nutritionally deficient media and within macrophages. These results suggest that nutrient deprivation in phagocytic cells combined with killing mediated by reactive intermediates underlies the decreased survival of alr mutants. This knowledge may be valuable in the construction of mycobacterial auxotrophic vaccine candidates.