Member of the two-component regulatory system NtrB/NtrC, which controls expression of the nitrogen-regulated (ntr) genes in response to nitrogen limitation. Under conditions of nitrogen limitation, NtrB autophosphorylates and transfers the phosphoryl group to NtrC. In the presence of nitrogen, acts as a phosphatase that dephosphorylates and inactivates NtrC. ATP + protein L-histidine = ADP + protein N-phospho-L-histidine. The phosphatase and kinase activities are regulated by the nitrogen regulatory proteins P-II 1 (GlnB) and P-II 2 (GlnK) (PubMed:2874557, PubMed:2574599, PubMed:10074086, PubMed:10231487). GlnB acts by binding to NtrB, leading to activation of the phosphatase activity and inhibition of the kinase activity. Binding of GlnB to NtrB is allosterically controlled by the small-molecule effector 2-ketoglutarate. At low 2-ketoglutarate concentrations, GlnB interacts with NtrB, but not at high 2-ketoglutarate concentrations (PubMed:10074086). Uridylylation of GlnB also prevents interaction with NtrB (PubMed:7961766). The C-terminal ATP-binding domain is required for both kinase and phosphatase activities and contains the GlnB binding site. Autophosphorylated.