Two–component systems (TCSs) sense specific signals, regulating countless physiological pathways. Heme concentrations are kept at defined levels in cells by means of exquisite regulatory networks, including TCS–mediated ones. Heme biosynthesis involves energetically costly pathways, which are finely controlled with degradation, avoiding toxicity of heme overabundance. The regulation of heme import/export is also integrated, securing proper homeostasis. In Leptospira —Spirochete bacteria—, the TCS HemKR regulates heme metabolism, yet the cues detected by the sensory kinase HemK are still unknown. Here we show that 5–aminolevulinic acid (ALA), a committed porphyrin biosynthesis precursor, is sensed by HemK shutting down the kinase′s autophosphorylation activity. In this way, ALA induces HemK to act as a phosphatase towards HemR, its cognate response regulator. HemR dephosphorylation leads to a substantial modulation of the bacterial gene expression profile, including the repression of genes encoding heme–biosynthesis enzymes and TonB–dependent iron–chelate/heme importer systems, combined with a simultaneous induction of heme oxygenase, critically involved in heme degradation. The transcription of several other genes linked to heme and iron homeostasis, is also modulated by HemKR, consistent with phenotypic differences between hemKR - double-knockout vs wild-type L. biflexa strains. Considering that heme oxygenase is a virulence factor in pathogenic Leptospira , HemKR is now identified as a relevant factor of spirochetal virulence regulation.