Member of the two-component regulatory system PhoP/PhoQ involved in virulence and adaptation to low Mg(2+) environments. In low periplasmic Mg(2+), PhoQ functions as a membrane-associated protein kinase that undergoes autophosphorylation and subsequently transfers the phosphate to PhoP, which results in the expression of PhoP-activated genes (PAG) and repression of PhoP-repressed genes (PRG). In high periplasmic Mg(2+), acts as a protein phosphatase that dephosphorylates phospho-PhoP, which results in the repression of PAG and may lead to expression of some PRG (By similarity). Necessary for resistance to killing by polymorphonuclear leukocytes (PMNs) and cationic antimicrobial peptides (CAMP) they produce. ATP + protein L-histidine = ADP + protein N-phospho-L-histidine. Homodimer.