Essential peptidoglycan synthases, like penicillin binding proteins 2 and 3 (PBP2/PBP3) of Escherichia coli, define shape by orchestrating cell elongation and division, respectively. Despite being intensively studied as drug targets, the regulatory rules governing their production remain poorly understood. During infection, the closely related pathogen Salmonella enterica serovar Typhimurium downregulates PBP2/PBP3 production and replace them with alternative peptidoglycan synthases, PBP2SAL/PBP3SAL, absent in E. coli. The bases for such switch in morphogenetic proteins are unknown. Here, we show that the S. Typhimurium regulator OmpR triggers PBP2SAL and PBP3SAL expression responding solely to acid pH and define a shared motif present in upstream regions of the PBP2SAL- and PBP3SAL-coding genes sufficient for such control. The elimination of PBP2/PBP3 in infection conditions is however multifactorial, requiring acidity, high osmolarity and being favoured by OmpR and the Prc protease. Remarkably, we found that E. coli loses the essential PBP3 required for cell division when exposed to both acidity and high osmolarity, the environmental cues encountered by intracellular S. Typhimurium. Therefore, OmpR played a central role in the evolution of this pathogen when co-opting the regulation of PBP2SAL/PBP3SAL and, consequently, promoting a new morphogenetic cycle that made possible increasing progeny inside acidic eukaryotic phagosomes.SignificanceSome enzymes that participate in peptidoglycan metabolism are present exclusively in bacterial pathogens and modify its structure to limit immune recognition. The intracellular pathogen Salmonella enterica serovar Typhimurium is the only example known to date in which a “substitution” of essential peptidoglycan enzymes involved in cell division and elongation takes place during infection. The data presented here support instability of PBP3 in environments with acidity and high osmolarity as a probable selective pressure that promoted the fixation of alternative morphogenetic enzymes. This was possible due to the control that OmpR exerted over these new foreign functions. The acquisition of enzymes like PBP2SAL and PBP3SAL therefore represent a “quantum leap” evolutionary event in S. Typhimurium that made possible the colonization of acidic intracellular niches.