Member of the two-component regulatory system PhoP/PhoQ involved in virulence, adaptation to low Mg(2+) environments and the control of acid resistance genes. In low periplasmic Mg(2+), PhoQ functions as a membrane-associated protein kinase that undergoes autophosphorylation and subsequently transfers the phosphate to PhoP, resulting 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 PG and may lead to expression of some PRG (By similarity). ATP + protein L-histidine = ADP + protein N-phospho-L-histidine. Homodimer.