Two-component signal transduction systems, consisting of histidine kinase (HK) sensors and DNA-binding response regulators, allow bacteria and archaea to respond to diverse environmental stimuli. HKs possess a conserved domain (H-box region) which contains the site of phosphorylation and an ATP-binding kinase domain. In this study, a genomic approach was taken to analyse the HK family in bacteria and archaea. Based on phylogenetic analysis, differences in the sequence and organization of the H-box and kinase domains, and the predicted secondary structure of the H-box region, five major HK types were identified. Of the 336 HKs analysed, 92% could be assigned to one of the five major HK types. The Type I HKs were found predominantly in bacteria while Type II HKs were not prevalent in bacteria but constituted the major type (13 of 15 HKs) in the archaeon Archaeoglobus fulgidus. Type III HKs were generally more prevalent in Gram-positive bacteria and were the major HK type (14 of 15 HKs) in the archaeon Methanobacterium thermoautotrophicum. Type IV HKs represented a minor type found in bacteria. The fifth HK type was composed of the chemosensor HKs, CheA. Several bacterial genomes contained all five HK types. In contrast, archaeal genomes either contained a specific HK type or lacked HKs altogether. These findings suggest that the different HK types originated in bacteria and that specific HK types were acquired in archaea by horizontal gene transfer.