Bacterial endophytes reside within the interior of plants without causing disease or forming symbiotic structures. Some endophytes, such as Klebsiella pneumoniae 342 (Kp342), enhance plant growth and nutrition. Others, such as Salmonella enterica serovar Typhimurium (S. typhimurium), are human pathogens that contaminate raw produce. Several lines of evidence are presented here to support the hypothesis that plant defense response pathways regulate colonization by endophytic bacteria. An ethylene-insensitive mutant of Medicago truncatula is hypercolonized by Kp342 compared to the parent genotype. Addition of ethylene, a signal molecule for induced systemic resistance in plants, decreased endophytic colonization in Medicago spp. This ethylene-mediated inhibition of endophytic colonization was reversed by addition of the ethylene action inhibitor, 1-methylcyclopropene. Colonization of Medicago spp. by S. typhimurium also was affected by exogenous ethylene. Mutants lacking flagella or a component of the type III secretion system of Salmonella pathogenicity island 1 (TTSS-SPI1) colonize the interior of Medicago spp. in higher numbers than the wild type. Arabidopsis defense response-related genotypes indicated that only salicylic acid (SA)-independent defense responses contribute to restricting colonization by Kp342. In contrast, colonization by S. typhimurium is affected by both SA-dependent and -independent responses. S. typhimurium mutants further delineated these responses, suggesting that both flagella and TTSS-SPI1 effectors can be recognized. Flagella act primarily through SA-independent responses (compromising SA accumulation still affected colonization in the absence of flagella). Removal of a TTSS-SPI1 effector resulted in hypercolonization regardless of whether the genotype was affected in either SA-dependent or SA-independent responses. Consistent with these results, S. typhimurium activates the promoter of PR1, a SA-dependent pathogenesis-related gene, while S. typhimurium mutants lacking the TTSS-SPI1 failed to activate this promoter. These observations suggest approaches to reduce contamination of raw produce by human enteric pathogens and to increase the number of growth-promoting bacteria in plants.