PhoP and PhoQ comprise a two-component system in the bacterium Salmonella enterica. PhoQ is the sensor kinase/phosphatase that modifies the phosphorylation state of the regulator PhoP in response to stimuli. The amount of phosphorylated PhoP surges after activation, then declines to reach a steady-state level. We now recapitulate this surge invitro by incubating PhoP and PhoQ with ATP and ADP. Mathematical modeling identified PhoQ's affinity for ADP as the key parameter dictating phosphorylated PhoP levels, as ADP promotes PhoQ's phosphatase activity toward phosphorylated PhoP. The lid covering the nucleotide-binding pocket of PhoQ governs the kinase to phosphatase switch because a lid mutation that decreased ADP binding compromised PhoQ's phosphatase activity invitro and resulted in sustained expression of PhoP-dependent mRNAs invivo. This feedback mechanism may curtail futile ATP consumption because ADP not only stimulates PhoQ's phosphatase activity but also inhibits ATP binding necessary for the kinase reaction.